]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/bitmap.cpp
Corrected a potential NULL pointer dereference in the SWIG runtime
[wxWidgets.git] / src / mac / carbon / bitmap.cpp
index 7cd5989cdef711c266b430be6d17bd75e0d840bc..8ae71b1ca0f151c72ab63186cbce6754b95221ab 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