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
This commit is contained in:
parent
479647105b
commit
e040a4ff2c
@ -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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user