Fix assert when creating wxBitmapButton without a valid bitmap in wxMSW.

wxBitmapButton can be created without a valid bitmap if SetBitmapLabel() is
called later, so don't call SetBitmapLabel() from the constructor if no bitmap
was provided.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-05-03 23:31:15 +00:00
parent a6df08eca3
commit ad94cb2b4f

View File

@@ -80,7 +80,8 @@ bool wxBitmapButton::Create(wxWindow *parent,
validator, name) )
return false;
SetBitmapLabel(bitmap);
if ( bitmap.IsOk() )
SetBitmapLabel(bitmap);
if ( !size.IsFullySpecified() )
{