wxTLW: don't assert when setting null icons initially (#10138)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2008-10-31 10:06:19 +00:00
parent ed7701bd5f
commit 13e451aee2

View File

@@ -993,6 +993,14 @@ void wxTopLevelWindowMSW::SetIcons(const wxIconBundle& icons)
{
wxTopLevelWindowBase::SetIcons(icons);
if ( icons.IsEmpty() )
{
// FIXME: SetIcons(wxNullIconBundle) should unset existing icons,
// but we currently don't do that
wxASSERT_MSG( m_icons.IsEmpty(), "unsetting icons doesn't work" );
return;
}
if ( !DoSelectAndSetIcon(icons, SM_CXSMICON, SM_CYSMICON, ICON_SMALL) &&
!DoSelectAndSetIcon(icons, SM_CXICON, SM_CYICON, ICON_BIG) )
{