]> git.saurik.com Git - wxWidgets.git/commitdiff
DP: Just came back from 3 days fishing and found that forget to commit some
authorDenis Pershin <dyp@inetlab.com>
Sat, 15 Aug 1998 14:42:09 +0000 (14:42 +0000)
committerDenis Pershin <dyp@inetlab.com>
Sat, 15 Aug 1998 14:42:09 +0000 (14:42 +0000)
changes.

GetBitmap added

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/imaglist.cpp

index 1629c414d97d2c559cc9ec4dce5a6ec81f8f374f..18052d78b131623f228db5c2735707040d2664b6 100644 (file)
@@ -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 )