]> git.saurik.com Git - wxWidgets.git/commitdiff
It should be possible to set a null bitmap without asserting due to change of size
authorJulian Smart <julian@anthemion.co.uk>
Mon, 5 Mar 2012 18:26:20 +0000 (18:26 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 5 Mar 2012 18:26:20 +0000 (18:26 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/anybutton.cpp

index 0e3da82ea348a59e883144101e312498b0da28bd..6251a69c5e7dd079470f61dc15f231f6783dd9c0 100644 (file)
@@ -3,7 +3,7 @@
 // Purpose:     wxAnyButton
 // Author:      Julian Smart
 // Created:     1998-01-04 (extracted from button.cpp)
-// RCS-ID:      $Id: anybutton.cpp 67384 2011-04-03 20:31:32Z DS $
+// RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -656,7 +656,7 @@ void wxAnyButton::DoSetBitmap(const wxBitmap& bitmap, State which)
     if ( m_imageData &&
           bitmap.GetSize() != m_imageData->GetBitmap(State_Normal).GetSize() )
     {
-        wxASSERT_MSG( which == State_Normal,
+        wxASSERT_MSG( (which == State_Normal) || bitmap.IsNull(),
                       "Must set normal bitmap with the new size first" );
 
 #if wxUSE_UXTHEME