]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/statbmp.cpp
minor cleanup
[wxWidgets.git] / src / mac / carbon / statbmp.cpp
index cb22a96bed3bc6d1a7d6ea3a3fb68c2969983ec1..e7ce2f1633631d9903085bbfcd66d89d09a144fb 100644 (file)
@@ -9,18 +9,14 @@
 // Licence:       wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-  #pragma implementation "statbmp.h"
-#endif
-
 #include "wx/wxprec.h"
 
+#if wxUSE_STATBMP
+
 #include "wx/statbmp.h"
 #include "wx/dcclient.h"
 
-#if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl)
-#endif
 
 /*
  * wxStaticBitmap
@@ -69,7 +65,10 @@ void wxStaticBitmap::OnPaint( wxPaintEvent& WXUNUSED(event) )
     wxPaintDC dc(this);
     PrepareDC(dc);
 
-    dc.DrawBitmap( m_bitmap , 0 , 0 , TRUE ) ;
+    if (m_bitmap.Ok())
+    {
+        dc.DrawBitmap( m_bitmap , 0 , 0 , TRUE ) ;
+    }
 }
 
 wxSize wxStaticBitmap::DoGetBestSize() const
@@ -81,3 +80,5 @@ wxSize wxStaticBitmap::DoGetBestSize() const
     return DoGetSizeFromClientSize( wxSize(16, 16) ); 
 }
 
+#endif
+