From: Hugo Pereira Da Costa Date: Wed, 5 Dec 2012 20:44:06 +0000 (+0100) Subject: Added curly brackets around DolphinApplication creation and execution, to make sure... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/f19811517a714ae19e8222727eaaa39d65605cd0 Added curly brackets around DolphinApplication creation and execution, to make sure it is deleted before "return 0;" is called. This might prevent random crashes due to the de-allocation chain in Qt at exit. CCBUG: 311092 --- diff --git a/src/main.cpp b/src/main.cpp index 39ecee8b8..6dd2b1e74 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -82,11 +82,13 @@ KDE_EXPORT int kdemain(int argc, char **argv) options.add("+[Url]", ki18nc("@info:shell", "Document to open")); KCmdLineArgs::addCmdLineOptions(options); - DolphinApplication app; - if (app.isSessionRestored()) { - app.restoreSession(); + { + DolphinApplication app; + if (app.isSessionRestored()) { + app.restoreSession(); + } + app.exec(); // krazy:exclude=crashy } - app.exec(); // krazy:exclude=crashy return 0; }