From: Jean-Baptiste Mardelle Date: Mon, 23 Jul 2012 07:06:18 +0000 (+0200) Subject: readOptions: Use QPointer [krazy 19/37] by Mikko Rapeli X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=2c520f24bbb09fd7f94cd3dc061c7739f9dba61c;p=kdenlive readOptions: Use QPointer [krazy 19/37] by Mikko Rapeli --- diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index b9c21904..b296baa0 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1830,12 +1830,13 @@ void MainWindow::readOptions() if (!initialGroup.exists() || upgrade) { // this is our first run, show Wizard - Wizard *w = new Wizard(upgrade, this); + QPointer w = new Wizard(upgrade, this); if (w->exec() == QDialog::Accepted && w->isOk()) { w->adjustSettings(); initialGroup.writeEntry("version", version); delete w; } else { + delete w; ::exit(1); } }