fix #50826: Add system text and undo causes crash in score with multiple parts

This commit is contained in:
lasconic 2015-03-15 17:02:22 +01:00
parent b0908e83b3
commit fa0415be94

View file

@ -3524,13 +3524,17 @@ void LinkUnlink::doUnlink()
{
Q_ASSERT(le == nullptr);
const LinkedElements* l = e->links();
for (ScoreElement* ee : *l) {
if (e != ee) {
le = ee;
break;
if (l != nullptr) {
for (ScoreElement* ee : *l) {
if (e != ee) {
le = ee;
break;
}
}
}
e->unlink();
else
qDebug() << "Nothing to unlink !?";
le->unlink();
}
void LinkStaff::redo() { s1->linkTo(s2); }