Crash fix for when a wxNullBitmap is passed in as the bitmap to use.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Ollivier
2009-02-08 23:08:20 +00:00
parent 49decc8f95
commit 6e23949a98

View File

@@ -47,7 +47,9 @@ wxWidgetImplType* wxWidgetImpl::CreateBitmapButton( wxWindowMac* wxpeer,
[v setBezelStyle:NSRegularSquareBezelStyle];
}
if (bitmap.Ok())
[v setImage:bitmap.GetNSImage() ];
[v setButtonType:NSMomentaryPushInButton];
wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
return c;