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,10 +559,13 @@ void LayerStackWidget::startAnimation(
} else { } else {
setupNewWidgets(); setupNewWidgets();
setCacheImages(); setCacheImages();
const auto weak = make_weak(this);
clearOldWidgets(); clearOldWidgets();
if (weak) {
prepareForAnimation(); prepareForAnimation();
_background->startAnimation(action); _background->startAnimation(action);
} }
}
} }
void LayerStackWidget::resizeEvent(QResizeEvent *e) { void LayerStackWidget::resizeEvent(QResizeEvent *e) {