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
This commit is contained in:
Hugo Pereira Da Costa 2012-12-05 21:44:06 +01:00
parent b2719884b9
commit f19811517a

View 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;
}