Review Request: Crash guards in KCMultiDialog

Stephen Kelly steveire at gmail.com
Tue Nov 10 10:08:37 GMT 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/2114/
-----------------------------------------------------------

Review request for kdelibs.


Summary
-------

Currently in trunk you get a crash when clicking configure in KJots.

The reason is that KJotsConfigDlg (which is-a KCMultiDialog) uses setButtons( Default | Ok | Cancel ); and so in KCMultiDialogPrivate, q->button(KDialog::Apply) is 0 and crashes on setAuthAction.

This patch adds crash guards.

However, The existing code looks a bit funny. In the else branch, setAuthAction is used even though it has been determined that currentModule->realModule()->needsAuthorization() is false. Is that right?


Diffs
-----

  trunk/KDE/kdelibs/kutils/kcmultidialog.cpp 1028931 

Diff: http://reviewboard.kde.org/r/2114/diff


Testing
-------

Fixes crash for me.


Thanks,

Stephen





More information about the kde-core-devel mailing list