X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0bf1e7cb96fc13d063f63c120983afa5a1537d0e..0e859e32234b3178254146f31653f478de0c5fba:/src/mac/carbon/statbmp.cpp diff --git a/src/mac/carbon/statbmp.cpp b/src/mac/carbon/statbmp.cpp index abe7a951b2..e7ce2f1633 100644 --- a/src/mac/carbon/statbmp.cpp +++ b/src/mac/carbon/statbmp.cpp @@ -9,18 +9,14 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ - #pragma implementation "statbmp.h" -#endif +#include "wx/wxprec.h" -#include "wx/defs.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 +