]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/bmpbuttn.cpp
check that the version of __sync_sub_and_fetch that returns a value is supported...
[wxWidgets.git] / src / msw / bmpbuttn.cpp
index 83f7efc9d5edfd2c64cbbd278ce0a29274178c14..333ab7a25bff5c4a6a3bdff74c663ab75a4292eb 100644 (file)
@@ -227,7 +227,7 @@ void wxBitmapButton::OnMouseEnterOrLeave(wxMouseEvent& event)
 void wxBitmapButton::SetBitmapLabel(const wxBitmap& bitmap)
 {
 #if wxUSE_IMAGE
-    if ( !HasFlag(wxBU_AUTODRAW) && !m_disabledSetByUser )
+    if ( !HasFlag(wxBU_AUTODRAW) && !m_disabledSetByUser && bitmap.IsOk() )
     {
         m_bmpDisabled = wxBitmap(bitmap.ConvertToImage().ConvertToGreyscale());
     }