diff --git a/qasecretservice.cpp b/qasecretservice.cpp index aa5d669..4d6f7ca 100644 --- a/qasecretservice.cpp +++ b/qasecretservice.cpp @@ -10,6 +10,10 @@ QByteArray QuasarAppUtils::QASecretService::getByAlias(const QString &alias) { proc.waitForFinished(2000); + if (proc.error() || proc.exitCode()) { + return ""; + } + QByteArray result = proc.readAllStandardOutput(); // drop \n @@ -27,6 +31,10 @@ QByteArray QuasarAppUtils::QASecretService::getByHash(const QByteArray &hash) proc.waitForFinished(2000); QByteArray result = proc.readAllStandardOutput(); + if (proc.error() || proc.exitCode()) { + return ""; + } + // drop \n return result.left(result.size() - 1); }