]> git.saurik.com Git - wxWidgets.git/commitdiff
Check for null pointers
authorJulian Smart <julian@anthemion.co.uk>
Tue, 23 May 2006 20:32:00 +0000 (20:32 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 23 May 2006 20:32:00 +0000 (20:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/controls/controls.cpp

index a5723dce31b15c292a387fbc81898bc5bb7760d1..999b4aa3f77ef2f256e708e39d576944a751d590 100644 (file)
@@ -1056,6 +1056,13 @@ void MyPanel::OnIdle(wxIdleEvent& event)
     static const int INVALID_SELECTION = -2;
 
     static int s_selCombo = INVALID_SELECTION;
+
+    if (!m_combo || !m_choice)
+    {
+        event.Skip();
+        return;
+    }
+
     int sel = m_combo->GetSelection();
     if ( sel != s_selCombo )
     {