fix #50826: Add system text and undo causes crash in score with multiple parts
This commit is contained in:
parent
b0908e83b3
commit
fa0415be94
1 changed files with 9 additions and 5 deletions
|
@ -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); }
|
||||
|
|
Loading…
Reference in a new issue