Commit 5343a18b authored by Hugo Pereira Da Costa's avatar Hugo Pereira Da Costa

Added curly brackets around DolphinApplication creation and execution, to make...

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
parent 2f4b089f
......@@ -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;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment