]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/bmpbuttn.mm
Fixed bug: wxPropertyGridInterface::SetPropertyReadOnly() with wxPG_DONT_RECURSE...
[wxWidgets.git] / src / osx / cocoa / bmpbuttn.mm
index fd5f716ff8a2361dc59e78e44512b9109cf3e625..516b5fe857ec06bb4770b0cedbb95720efcce875 100644 (file)
 #include "wx/osx/private.h"
 
 wxWidgetImplType* wxWidgetImpl::CreateBitmapButton( wxWindowMac* wxpeer, 
-                                    wxWindowMac* parent
-                                    wxWindowID id
+                                    wxWindowMac* WXUNUSED(parent)
+                                    wxWindowID WXUNUSED(id)
                                     const wxBitmap& bitmap,
                                     const wxPoint& pos, 
                                     const wxSize& size,
                                     long style, 
-                                    long extraStyle
+                                    long WXUNUSED(extraStyle)
 {
     NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
     wxNSButton* v = [[wxNSButton alloc] initWithFrame:r];
@@ -47,7 +47,9 @@ wxWidgetImplType* wxWidgetImpl::CreateBitmapButton( wxWindowMac* wxpeer,
             [v setBezelStyle:NSRegularSquareBezelStyle];
     }
     
-    [v setImage:bitmap.GetNSImage() ];
+    if (bitmap.Ok())
+        [v setImage:bitmap.GetNSImage() ];
+    
     [v setButtonType:NSMomentaryPushInButton];
     wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
     return c;