From: Vadim Zeitlin Date: Wed, 12 Jan 2011 13:39:29 +0000 (+0000) Subject: Fix crash in wxGenericRichMessageDialog::IsCheckBoxChecked(). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/17731af57d6b0e5060bdcdfc60ee218952e81c8d Fix crash in wxGenericRichMessageDialog::IsCheckBoxChecked(). The test for checkbox existence was inversed resulting in a guaranteed crash when calling IsCheckBoxChecked() before showing the dialog. Closes #12866. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/richmsgdlgg.cpp b/src/generic/richmsgdlgg.cpp index c656332a68..97882a2579 100644 --- a/src/generic/richmsgdlgg.cpp +++ b/src/generic/richmsgdlgg.cpp @@ -84,7 +84,7 @@ bool wxGenericRichMessageDialog::IsCheckBoxChecked() const { // This function can be called before the dialog is shown and hence before // the check box is created. - return m_checkBox? m_checkBoxValue : m_checkBox->IsChecked(); + return m_checkBox ? m_checkBox->IsChecked() : m_checkBoxValue; } #endif // wxUSE_RICHMSGDLG