1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-07-19 06:55:24 +02:00

macOS: fix crash on force quit

This patch ensures that views are destroyed when the user quits
the application.

Change-Id: I173643136d277fe604838bdf19a6c292b066ee8d
This commit is contained in:
Kateryna Kostiuk 2023-08-22 09:04:27 -04:00
parent b1ca6cf861
commit d1eb1f5885

View file

@ -122,9 +122,6 @@ ApplicationWindow {
// If we're in the onboarding wizard or 'MinimizeOnClose'
// is set, then we can quit
if (force || !UtilsAdapter.getAppValue(Settings.MinimizeOnClose) || !UtilsAdapter.getAccountListSize()) {
if (checkLoadedSource() === MainApplicationWindow.LoadedSource.MainView) {
cleanupMainView();
}
Qt.quit();
} else {
layoutManager.closeToTray();
@ -233,6 +230,10 @@ ApplicationWindow {
Connections {
target: MainApplication
function onAboutToQuit() {
cleanupMainView()
}
function onCloseRequested() {
close(true);
}