]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/toplevel.cpp
Fixed inability to select no superscript and no subscript in wxRichTextCtrl's
[wxWidgets.git] / src / msw / toplevel.cpp
index ec54792ae3c4805dfb531f82a71e42a3e025da9e..c0657b18bfd603af4e330b280b8cafff8af0985b 100644 (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) )
     {