Browse Source

Stop helper only if formerly started.

Differential Revision: https://phabricator.kde.org/D25161
BUG: 413851
4.0
Hartmut Goebel 1 year ago
committed by Andrius Štikonas
parent
commit
c02d59aa6d
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/util/externalcommand.cpp

+ 3
- 0
src/util/externalcommand.cpp 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;
}


Loading…
Cancel
Save