Stop helper only if formerly started.
Differential Revision: https://phabricator.kde.org/D25161 BUG: 413851
This commit is contained in:
parent
c9a08a593b
commit
c02d59aa6d
|
@ -433,6 +433,8 @@ bool ExternalCommand::startHelper()
|
||||||
|
|
||||||
void ExternalCommand::stopHelper()
|
void ExternalCommand::stopHelper()
|
||||||
{
|
{
|
||||||
|
if (!helperStarted)
|
||||||
|
return;
|
||||||
auto *interface = new org::kde::kpmcore::externalcommand(QStringLiteral("org.kde.kpmcore.externalcommand"),
|
auto *interface = new org::kde::kpmcore::externalcommand(QStringLiteral("org.kde.kpmcore.externalcommand"),
|
||||||
QStringLiteral("/Helper"), QDBusConnection::systemBus());
|
QStringLiteral("/Helper"), QDBusConnection::systemBus());
|
||||||
QByteArray request;
|
QByteArray request;
|
||||||
|
@ -441,6 +443,7 @@ void ExternalCommand::stopHelper()
|
||||||
QByteArray hash = QCryptographicHash::hash(request, QCryptographicHash::Sha512);
|
QByteArray hash = QCryptographicHash::hash(request, QCryptographicHash::Sha512);
|
||||||
interface->exit(privateKey->signMessage(hash, QCA::EMSA3_Raw), nonce);
|
interface->exit(privateKey->signMessage(hash, QCA::EMSA3_Raw), nonce);
|
||||||
|
|
||||||
|
helperStarted = false;
|
||||||
delete privateKey;
|
delete privateKey;
|
||||||
delete init;
|
delete init;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue