From 45aee08b3b23eab7d1268b1cf0ef8a4865324bf6 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 23 Aug 2005 07:46:30 +0000 Subject: [PATCH] Don't try drawing the bitmap before it's valid git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/statbmp.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mac/carbon/statbmp.cpp b/src/mac/carbon/statbmp.cpp index 9a13660d97..3cb137e00f 100644 --- a/src/mac/carbon/statbmp.cpp +++ b/src/mac/carbon/statbmp.cpp @@ -69,7 +69,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 -- 2.45.2