mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-19 16:31:21 +00:00
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:
parent
b2719884b9
commit
f19811517a
10
src/main.cpp
10
src/main.cpp
|
@ -82,11 +82,13 @@ KDE_EXPORT int kdemain(int argc, char **argv)
|
||||||
options.add("+[Url]", ki18nc("@info:shell", "Document to open"));
|
options.add("+[Url]", ki18nc("@info:shell", "Document to open"));
|
||||||
KCmdLineArgs::addCmdLineOptions(options);
|
KCmdLineArgs::addCmdLineOptions(options);
|
||||||
|
|
||||||
DolphinApplication app;
|
{
|
||||||
if (app.isSessionRestored()) {
|
DolphinApplication app;
|
||||||
app.restoreSession();
|
if (app.isSessionRestored()) {
|
||||||
|
app.restoreSession();
|
||||||
|
}
|
||||||
|
app.exec(); // krazy:exclude=crashy
|
||||||
}
|
}
|
||||||
app.exec(); // krazy:exclude=crashy
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue