From e040a4ff2ccc22443f715470515447b9bb754598 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 12 Sep 2007 00:21:48 +0000 Subject: [PATCH] fix assert for bitmaps buttons created without bitmap initially git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/bmpbuttn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/bmpbuttn.cpp b/src/msw/bmpbuttn.cpp index 83f7efc9d5..333ab7a25b 100644 --- a/src/msw/bmpbuttn.cpp +++ b/src/msw/bmpbuttn.cpp @@ -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()); }