Merge pull request #15501 from thoys/fix/asyncDailogsExitCrash

BUGZ-73: Fix crash for active async messageBoxes on exit of client
This commit is contained in:
Shannon Romano 2019-05-03 15:40:48 -07:00 committed by GitHub
commit 2618ad09c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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);
}
};