]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix crash in wxGenericRichMessageDialog::IsCheckBoxChecked().
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 12 Jan 2011 13:39:29 +0000 (13:39 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 12 Jan 2011 13:39:29 +0000 (13:39 +0000)
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

src/generic/richmsgdlgg.cpp

index c656332a6817057d410e725b24757d9ee091fa43..97882a2579da1404532afcd6d378daed831a55ce 100644 (file)
@@ -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