Fix crash when copying & pasting removed layers

If we Ctrl+C a set of layers, then we remove some of those layers, and
Ctrl+V in other document, the program will crash.
This commit is contained in:
David Capello 2016-12-07 09:34:29 -03:00
parent f950e2e787
commit 0c8b5c6a4f

View File

@ -1092,6 +1092,7 @@ void Timeline::onAddLayer(doc::DocumentEvent& ev)
regenerateLayers();
showCurrentCel();
clearClipboardRange();
invalidate();
}
@ -1119,6 +1120,7 @@ void Timeline::onAfterRemoveLayer(doc::DocumentEvent& ev)
regenerateLayers();
showCurrentCel();
clearClipboardRange();
invalidate();
}