diff options
Diffstat (limited to 'src/basket.cpp')
-rw-r--r-- | src/basket.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/basket.cpp b/src/basket.cpp index a4edb31..67107d2 100644 --- a/src/basket.cpp +++ b/src/basket.cpp @@ -4469,12 +4469,20 @@ void Basket::noteUngroup() void Basket::unplugSelection(NoteSelection *selection) { + if (!selection) + { + return; + } for (NoteSelection *toUnplug = selection->firstStacked(); toUnplug; toUnplug = toUnplug->nextStacked()) unplugNote(toUnplug->note); } void Basket::insertSelection(NoteSelection *selection, Note *after) { + if (!selection) + { + return; + } for (NoteSelection *toUnplug = selection->firstStacked(); toUnplug; toUnplug = toUnplug->nextStacked()) { if (toUnplug->note->isGroup()) { Note *group = new Note(this); @@ -4496,6 +4504,10 @@ void Basket::insertSelection(NoteSelection *selection, Note *after) void Basket::selectSelection(NoteSelection *selection) { + if (!selection) + { + return; + } for (NoteSelection *toUnplug = selection->firstStacked(); toUnplug; toUnplug = toUnplug->nextStacked()) { if (toUnplug->note->isGroup()) selectSelection(toUnplug); |