From fe93da75f410cbfa2ac48f69d979a7dc6885a1b1 Mon Sep 17 00:00:00 2001 From: Catalin Date: Wed, 29 Apr 2015 17:27:43 +0300 Subject: [PATCH] Do not crash when an invalid widget is handled, i.e. null StaticBitmap widget when the image file could not be found. --- samples/widgets/widgets.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/samples/widgets/widgets.cpp b/samples/widgets/widgets.cpp index d38c423d92..d9e4102a5a 100644 --- a/samples/widgets/widgets.cpp +++ b/samples/widgets/widgets.cpp @@ -1253,6 +1253,8 @@ void WidgetsPage::SetUpWidget() it != widgets.end(); ++it ) { + wxCHECK_RET(*it, "NULL widget"); + #if wxUSE_TOOLTIPS (*it)->SetToolTip(GetAttrs().m_tooltip); #endif // wxUSE_TOOLTIPS