Home GnuPG

Don't crash when showing the audit log

Description

Don't crash when showing the audit log

KMessageBox::createKMessageBox deletes the dialog so that we cannot call
dialog->parentWidget() afterward. We have to store the dialog's parent
widget before the call. For additional safety we put it into a QPointer
because the parent widget might also be deleted while the message box is
shown.

Interestingly, it doesn't crash for me but I guess I'm just lucky that
dialog->parentWidget() doesn't return an invalid pointer.

Fixes https://crash-reports.kde.org/organizations/kde/issues/381762

Details

Provenance
ikloeckerAuthored on Thu, Mar 5, 5:16 PM
Parents
rLIBKLEO9c07fa947593: GIT_SILENT Sync po/docbooks with svn
Branches
Unknown
Tags
Unknown
References
HEAD -> master