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:
@@ -80,7 +80,8 @@ bool wxBitmapButton::Create(wxWindow *parent,
|
||||
validator, name) )
|
||||
return false;
|
||||
|
||||
SetBitmapLabel(bitmap);
|
||||
if ( bitmap.IsOk() )
|
||||
SetBitmapLabel(bitmap);
|
||||
|
||||
if ( !size.IsFullySpecified() )
|
||||
{
|
||||
|
Reference in New Issue
Block a user