X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5f1f21d2a54124859b1fbeaa31ebf373bb5f0114..9d5507f7a2701395e1d5c121bd877bb9066ee6ea:/src/msw/bmpbuttn.cpp?ds=sidebyside 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()); }