diff --git a/samples/widgets/slider.cpp b/samples/widgets/slider.cpp index 9fc211cc63..7b3c89bbc6 100644 --- a/samples/widgets/slider.cpp +++ b/samples/widgets/slider.cpp @@ -493,6 +493,12 @@ void SliderWidgetsPage::OnButtonSetMinAndMax(wxCommandEvent& WXUNUSED(event)) m_max = maxNew; m_slider->SetRange(minNew, maxNew); + + if ( m_slider->GetMin() != m_min || + m_slider->GetMax() != m_max ) + { + wxLogWarning(_T("Invalid range in slider.")); + } } void SliderWidgetsPage::OnButtonSetValue(wxCommandEvent& WXUNUSED(event))