Fixed problems with wxFrame::SetIcons

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon
2002-03-28 20:51:55 +00:00
parent 33980f0da6
commit 7efaed4de4
4 changed files with 21 additions and 16 deletions

View File

@@ -83,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 )
@@ -105,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;