fixed logical error in SetIcons(): only assert if no icon was set, at least one is OK

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2009-03-28 20:06:26 +00:00
parent 6ab6fc6eec
commit 7d45a79353

View File

@@ -1011,8 +1011,12 @@ void wxTopLevelWindowMSW::SetIcons(const wxIconBundle& icons)
return; return;
} }
if ( !DoSelectAndSetIcon(icons, SM_CXSMICON, SM_CYSMICON, ICON_SMALL) && bool anySet =
!DoSelectAndSetIcon(icons, SM_CXICON, SM_CYICON, ICON_BIG) ) DoSelectAndSetIcon(icons, SM_CXSMICON, SM_CYSMICON, ICON_SMALL);
if ( DoSelectAndSetIcon(icons, SM_CXICON, SM_CYICON, ICON_BIG) )
anySet = true;
if ( !anySet )
{ {
wxFAIL_MSG( "icon bundle doesn't contain any suitable icon" ); wxFAIL_MSG( "icon bundle doesn't contain any suitable icon" );
} }