Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit be886ddf authored by Andre Heinecke's avatar Andre Heinecke

Do not try to get audit log for erroneous contexts

On error gpgme closes the assuan context of the
gpgme context. Calling getAuditLog on a closed context
leads to a crash.

BUG: 349180
REVIEW: 124175
FIXED-IN: 4.14.10
parent e0fc73a2
......@@ -56,7 +56,7 @@ QString _detail::audit_log_as_html( Context * ctx, GpgME::Error & err ) {
QGpgME::QByteArrayDataProvider dp;
Data data( &dp );
assert( !data.isNull() );
if ( ( err = ctx->getAuditLog( data, GetAuditLogFlags ) ) )
if ( ( err = ctx->lastError() ) || ( err = ctx->getAuditLog( data, GetAuditLogFlags ) ) )
return QString::fromLocal8Bit( err.asString() );
const QByteArray ba = dp.data();
return QString::fromUtf8( ba.data(), ba.size() );
......
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