Commit c5beec96 authored by Lamarque Souza's avatar Lamarque Souza
Browse files

Add some checks to prevent crash when PolicyKit denied connection

editing.

CCBUG: 287531
parent 4b4b4883
......@@ -541,18 +541,24 @@ void ManageConnectionWidget::editGotSecrets(bool valid, const QString &errorMess
KMessageBox::error(this, i18n("Error"));
else
KMessageBox::error(this, errorMessage);
}
kDebug() << uuid << mEditConnection->uuid();
if (mEditConnection && mEditConnection->uuid() == uuid) {
delete mEditConnection;
mEditConnection = 0;
return;
}
}
if (uuid != mEditConnection->uuid()) {
if (!mEditConnection || mEditConnection->uuid() != uuid) {
return;
}
kDebug() << uuid << mEditConnection->uuid();
Knm::Connection *result = mEditor->editConnection(mEditConnection); //starts editor window
if (result) {
mSystemSettings->updateConnection(mEditConnection->uuid().toString(), result);
}
delete mEditConnection;
mEditConnection = 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