Add guard in layers destruction.

This commit is contained in:
John Preston 2018-12-11 17:12:35 +04:00
parent b683d84df1
commit 3904a9f9a0
1 changed files with 5 additions and 2 deletions

View File

@ -559,9 +559,12 @@ void LayerStackWidget::startAnimation(
} else {
setupNewWidgets();
setCacheImages();
const auto weak = make_weak(this);
clearOldWidgets();
prepareForAnimation();
_background->startAnimation(action);
if (weak) {
prepareForAnimation();
_background->startAnimation(action);
}
}
}