]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Added curly brackets around DolphinApplication creation and execution, to make sure...
authorHugo Pereira Da Costa <hugo@oxygen-icons.org>
Wed, 5 Dec 2012 20:44:06 +0000 (21:44 +0100)
committerHugo Pereira Da Costa <hugo@oxygen-icons.org>
Wed, 5 Dec 2012 20:44:06 +0000 (21:44 +0100)
called. This might prevent random crashes due to the de-allocation chain in Qt at exit.
CCBUG: 311092

src/main.cpp

index 39ecee8b8b327b5283197d160d3def2580c020e3..6dd2b1e7498008991bc19d656ec57fd38d3f52c5 100644 (file)
@@ -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;
 }