X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f618020a15f1647a83aaeab1fe315f90497a9876..8ac795151e371a114dfcfbe30aea0e04d62ec6b0:/src/common/iconbndl.cpp diff --git a/src/common/iconbndl.cpp b/src/common/iconbndl.cpp index 13a5d84d34..ef64f80fae 100644 --- a/src/common/iconbndl.cpp +++ b/src/common/iconbndl.cpp @@ -21,12 +21,15 @@ #ifndef WX_PRECOMP #include "wx/settings.h" - #include "wx/image.h" #include "wx/icon.h" #include "wx/log.h" #include "wx/intl.h" #endif +#ifndef _WX_IMAGE_H_ + #include "wx/image.h" +#endif + #include "wx/iconbndl.h" #include "wx/arrimpl.cpp" @@ -80,6 +83,8 @@ const wxIcon& wxIconBundle::GetIcon( const wxSize& size ) const for( i = 0; i < max; ++i ) { + if( !m_icons[i].Ok() ) + continue; wxCoord sx = m_icons[i].GetWidth(), sy = m_icons[i].GetHeight(); // requested size if( sx == size.x && sy == size.y ) @@ -102,7 +107,7 @@ void wxIconBundle::AddIcon( const wxIcon& icon ) for( i = 0; i < max; ++i ) { wxIcon& tmp = m_icons[i]; - if( tmp.GetWidth() == icon.GetWidth() && + if( tmp.Ok() && tmp.GetWidth() == icon.GetWidth() && tmp.GetHeight() == icon.GetHeight() ) { tmp = icon;