From 25e19bdf01215a2e949623a1d14b3d40943a22a3 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 23 May 2006 20:32:00 +0000 Subject: [PATCH] Check for null pointers git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/controls/controls.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/samples/controls/controls.cpp b/samples/controls/controls.cpp index a5723dce31..999b4aa3f7 100644 --- a/samples/controls/controls.cpp +++ b/samples/controls/controls.cpp @@ -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 ) { -- 2.45.2