]> git.saurik.com Git - wxWidgets.git/commitdiff
ConvertToImage: Check !Ok() (we may not have any ref data at all) and if
authorDavid Elliott <dfe@tgwbd.org>
Thu, 29 Jan 2004 06:26:10 +0000 (06:26 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Thu, 29 Jan 2004 06:26:10 +0000 (06:26 +0000)
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

index b9575fc890e24319996b91e116fbbf0c32b2bf95..bb7302cf8e9d685a836b8e6275bed365a9279c5c 100644 (file)
@@ -362,8 +362,8 @@ wxBitmap wxBitmap::GetSubBitmap(wxRect const&) const
 
 wxImage wxBitmap::ConvertToImage() 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);
 }
 
     return wxImage(M_BITMAPDATA->m_width,M_BITMAPDATA->m_height);
 }