diff --git a/include/wx/generic/imaglist.h b/include/wx/generic/imaglist.h index d13864cbbf..60f0c5d8e3 100644 --- a/include/wx/generic/imaglist.h +++ b/include/wx/generic/imaglist.h @@ -59,7 +59,7 @@ class wxImageList: public wxObject bool Create(); int GetImageCount() const; int Add( const wxBitmap &bitmap ); - wxBitmap *GetBitmap(int index); + const wxBitmap *GetBitmap(int index) const; bool Replace( int index, const wxBitmap &bitmap ); bool Remove( int index ); bool RemoveAll(); diff --git a/src/generic/imaglist.cpp b/src/generic/imaglist.cpp index 543d019cdf..20a5101650 100644 --- a/src/generic/imaglist.cpp +++ b/src/generic/imaglist.cpp @@ -48,7 +48,7 @@ int wxImageList::Add( const wxBitmap &bitmap ) return m_images.Number(); } -wxBitmap *wxImageList::GetBitmap(int index) { +const wxBitmap *wxImageList::GetBitmap(int index) const { wxNode *node = m_images.Nth(index); if (node != NULL) return (wxBitmap*)node->Data();