Fix crash when we apply a filter that removes a cel

This commit is contained in:
David Capello 2018-09-18 09:37:00 -03:00
parent 5b6c35aa86
commit 7984e0beb8

View File

@ -442,6 +442,12 @@ void DocView::onAddCel(DocEvent& ev)
void DocView::onRemoveCel(DocEvent& ev)
{
// This can happen when we apply a filter that clear the whole cel
// and then the cel is removed in a background/job
// thread. (e.g. applying a convolution matrix)
if (!ui::is_ui_thread())
return;
UIContext::instance()->notifyActiveSiteChanged();
}