┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorHugo Pereira Da Costa <[email protected]>2012-12-05 21:44:06 +0100
committerHugo Pereira Da Costa <[email protected]>2012-12-05 21:44:06 +0100
commitf19811517a714ae19e8222727eaaa39d65605cd0 (patch)
tree081fd432e7fb02b26e0635489c5839d19e111ce7 /src/main.cpp
parentb2719884b9cdd31b293e785aebabddabf374383d (diff)
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
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp10
1 files changed, 6 insertions, 4 deletions
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;
}