Commit 7df45640 authored by John Gehrig's avatar John Gehrig Committed by Nate Graham

Crash in sddmthemeinstaller invalid use of errorString

Summary:
The destruction of KAuth::ExecuteJob* "job" is not handled properly when passed as a parameter to KMessageBox.

An intermediate QString is created containing the error text. This value is passed into the KMessageBox and qWarning() so that the object "job" is no longer an input. The console error is now first so an error message displayed even in the event of a GUI crash.

BUG: 406718
BUG: 404609
FIXED-IN: 5.16.0

Test Plan: The patch has been applied to my system and the crash no longer occurs.

Reviewers: ngraham, davidedmundson, #plasma

Reviewed By: ngraham, davidedmundson, #plasma

Subscribers: anthonyfieroni, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D20859
parent fd00de56
......@@ -72,8 +72,9 @@ int main(int argc, char **argv)
KAuth::ExecuteJob *job = action.execute();
bool rc = job->exec();
if (!rc) {
KMessageBox::sorry(nullptr, i18n("Unable to install theme"), job->errorString());
qWarning() << job->error() << job->errorString();
QString errorString = job->errorString();
qWarning() << job->error() << errorString;
KMessageBox::sorry(nullptr, errorString, i18n("Unable to install theme"));
return -1;
}
......
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