X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7b1279006496ba3251a755bcef91301ad107bb78..f9b24f070c67c61d11a0032054e0a229d876f38d:/samples/widgets/spinbtn.cpp diff --git a/samples/widgets/spinbtn.cpp b/samples/widgets/spinbtn.cpp index 62b68b0916..609870b89a 100644 --- a/samples/widgets/spinbtn.cpp +++ b/samples/widgets/spinbtn.cpp @@ -165,6 +165,13 @@ SpinBtnWidgetsPage::SpinBtnWidgetsPage(wxNotebook *notebook, wxImageList *imaglist) : WidgetsPage(notebook) { + m_chkVert = NULL; + m_chkWrap = NULL; + m_spinbtn = NULL; + m_spinctrl = NULL; + m_textValue = NULL; + m_textMin = NULL; + m_textMax = NULL; imaglist->Add(wxBitmap(spinbtn_xpm)); // init everything @@ -410,6 +417,8 @@ void SpinBtnWidgetsPage::OnSpinBtnDown(wxCommandEvent& event) void SpinBtnWidgetsPage::OnSpinCtrl(wxCommandEvent& event) { + if (!m_spinctrl) + return; int value = event.GetInt(); wxASSERT_MSG( value == m_spinctrl->GetValue(), @@ -417,4 +426,4 @@ void SpinBtnWidgetsPage::OnSpinCtrl(wxCommandEvent& event) wxLogMessage(_T("Spin control value changed, now %d"), value); } -#endif \ No newline at end of file +#endif