Compare commits

...

1 Commits
master ... 4.0

Author SHA1 Message Date
Hartmut Goebel c02d59aa6d Stop helper only if formerly started.
Differential Revision: https://phabricator.kde.org/D25161
BUG: 413851
2019-11-07 22:16:36 +00:00
1 changed files with 3 additions and 0 deletions

View File

@ -433,6 +433,8 @@ bool ExternalCommand::startHelper()
void ExternalCommand::stopHelper()
{
if (!helperStarted)
return;
auto *interface = new org::kde::kpmcore::externalcommand(QStringLiteral("org.kde.kpmcore.externalcommand"),
QStringLiteral("/Helper"), QDBusConnection::systemBus());
QByteArray request;
@ -441,6 +443,7 @@ void ExternalCommand::stopHelper()
QByteArray hash = QCryptographicHash::hash(request, QCryptographicHash::Sha512);
interface->exit(privateKey->signMessage(hash, QCA::EMSA3_Raw), nonce);
helperStarted = false;
delete privateKey;
delete init;
}