]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/bitmap.cpp
Remove debugging code accidentally left in
[wxWidgets.git] / src / mac / carbon / bitmap.cpp
index 7cd5989cdef711c266b430be6d17bd75e0d840bc..4339cf4b57c3d2c304d8786a25a1c4525643efaa 100644 (file)
@@ -108,6 +108,10 @@ void wxMacReleaseBitmapButton( ControlButtonContentInfo*info )
     {
         ReleaseIconRef( info->u.iconRef ) ;
     }
+    else if ( info->contentType == kControlNoContent )
+    {
+        // there's no bitmap at all, fall through silently
+    }
     else if ( info->contentType == kControlContentPictHandle )
     {
         // owned by the bitmap, no release here
@@ -702,6 +706,7 @@ bool wxBitmap::CopyFromIcon(const wxIcon& icon)
             EndRawAccess() ;
             DisposeHandle( imagehandle ) ;
             DisposeHandle( maskhandle ) ;
+            created = true ;
         }
         DisposeHandle( (Handle) iconFamily ) ;
         
@@ -1072,15 +1077,12 @@ wxImage wxBitmap::ConvertToImage() const
             {
                 if ( *maskp++ == 0 )
                 {
-                    if ( r == MASK_RED && g == MASK_GREEN && b == MASK_BLUE )
-                        b = MASK_BLUE_REPLACEMENT ;
-                    else
-                    {
-                        r = MASK_RED ;
-                        g = MASK_GREEN ;
-                        b = MASK_BLUE ;
-                    }
+                    r = MASK_RED ;
+                    g = MASK_GREEN ;
+                    b = MASK_BLUE ;
                 }
+                else if ( r == MASK_RED && g == MASK_GREEN && b == MASK_BLUE )
+                    b = MASK_BLUE_REPLACEMENT ;
             }
             else if ( hasAlpha )
                 *alpha++ = a ;