Fix crash for active async messageBoxes on exit of client

This commit is contained in:
Thijs Wenker 2019-05-02 19:11:02 +02:00
parent 06dc9fc39f
commit 119b97216f

View file

@ -252,7 +252,9 @@ private slots:
_finished = true;
auto offscreenUi = DependencyManager::get<OffscreenUi>();
emit response(_result);
offscreenUi->removeModalDialog(qobject_cast<QObject*>(this));
if (!offscreenUi.isNull()) {
offscreenUi->removeModalDialog(qobject_cast<QObject*>(this));
}
disconnect(_dialog);
}
};