]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/dataobj.cpp
Also accept VT_R4 (float) VARIANTs in wxMSW OLE code.
[wxWidgets.git] / src / osx / carbon / dataobj.cpp
index 971def9d938b59ee6d2991bf8f425bd75f821288..a4cfb843afe5a50ba1f34c523eaab2186b249567 100644 (file)
@@ -534,7 +534,7 @@ bool wxDataObject::HasDataInPasteboard( void * pb )
                     wxDataFormat flavorFormat( (wxDataFormat::NativeFormat) flavorType );
 
                     if ( dataFormat == flavorFormat ||
                     wxDataFormat flavorFormat( (wxDataFormat::NativeFormat) flavorType );
 
                     if ( dataFormat == flavorFormat ||
-                        dataFormat.GetType() == wxDF_UNICODETEXT && flavorFormat.GetType() == wxDF_TEXT )
+                        (dataFormat.GetType() == wxDF_UNICODETEXT && flavorFormat.GetType() == wxDF_TEXT) )
                     {
                         hasData = true;
                     }
                     {
                         hasData = true;
                     }
@@ -742,8 +742,8 @@ bool wxBitmapDataObject::SetData( size_t nSize, const void *pBuf )
     if ( source )
     {
         cgImageRef = CGImageSourceCreateImageAtIndex(source, 0, NULL);
     if ( source )
     {
         cgImageRef = CGImageSourceCreateImageAtIndex(source, 0, NULL);
+        CFRelease( source );
     }
     }
-    CFRelease( source );
     CFRelease( data );
 
     if ( cgImageRef )
     CFRelease( data );
 
     if ( cgImageRef )