From: Václav Slavík Date: Sat, 28 Mar 2009 20:06:26 +0000 (+0000) Subject: fixed logical error in SetIcons(): only assert if no icon was set, at least one is OK X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7d45a79353bb57b98326567ab8dae73a224127dc 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 --- diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 3136e36631..41c488a625 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -1011,8 +1011,12 @@ void wxTopLevelWindowMSW::SetIcons(const wxIconBundle& icons) return; } - if ( !DoSelectAndSetIcon(icons, SM_CXSMICON, SM_CYSMICON, ICON_SMALL) && - !DoSelectAndSetIcon(icons, SM_CXICON, SM_CYICON, ICON_BIG) ) + bool anySet = + 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" ); }