diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp index 47a0bd9666..6bee0c9353 100644 --- a/src/gui/accountsettings.cpp +++ b/src/gui/accountsettings.cpp @@ -362,6 +362,7 @@ void AccountSettings::slotAddFolder() folderMan->setSyncEnabled(false); // do not start more syncs. FolderWizard *folderWizard = new FolderWizard(_accountState->account(), this); + folderWizard->setAttribute(Qt::WA_DeleteOnClose); connect(folderWizard, &QDialog::accepted, this, &AccountSettings::slotFolderWizardAccepted); connect(folderWizard, &QDialog::rejected, this, &AccountSettings::slotFolderWizardRejected);