From 8b21b87fe330378e8bc448eee2494e3dd2c97a37 Mon Sep 17 00:00:00 2001 From: Denis Pershin Date: Sat, 15 Aug 1998 14:42:09 +0000 Subject: [PATCH] DP: Just came back from 3 days fishing and found that forget to commit some changes. GetBitmap added git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/imaglist.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/generic/imaglist.cpp b/src/generic/imaglist.cpp index 1629c414d9..18052d78b1 100644 --- a/src/generic/imaglist.cpp +++ b/src/generic/imaglist.cpp @@ -49,8 +49,11 @@ int wxImageList::Add( const wxBitmap &bitmap ) }; wxBitmap *wxImageList::GetBitmap(int index) { - wxNode *node = m_images.Nth( index ); - return (wxBitmap*)node->Data(); + wxNode *node = m_images.Nth(index); + if (node != NULL) + return (wxBitmap*)node->Data(); + + return NULL; } bool wxImageList::Replace( int index, const wxBitmap &bitmap ) -- 2.45.2