From f8c10ed8b399f864a8ab7fafe4f73ae0365d4827 Mon Sep 17 00:00:00 2001 From: David Elliott Date: Thu, 29 Jan 2004 06:26:10 +0000 Subject: [PATCH] ConvertToImage: Check !Ok() (we may not have any ref data at all) and if the bitmap is not okay return wxNullImage (instead of a dummy 5x5 image) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/cocoa/bitmap.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cocoa/bitmap.mm b/src/cocoa/bitmap.mm index b9575fc890..bb7302cf8e 100644 --- a/src/cocoa/bitmap.mm +++ b/src/cocoa/bitmap.mm @@ -362,8 +362,8 @@ wxBitmap wxBitmap::GetSubBitmap(wxRect const&) const wxImage wxBitmap::ConvertToImage() const { - if(!M_BITMAPDATA->m_ok) - return wxImage(5,5)/*wxNullImage*/; + if(!Ok()) + return /*wxImage(5,5)*/wxNullImage; return wxImage(M_BITMAPDATA->m_width,M_BITMAPDATA->m_height); } -- 2.45.2