X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5d3a3a5cbcdbe9ad10b808bf65a636e17c734fca..4a6a2972a218d918bebf46331d2bb2eb8ccaeb69:/src/mac/carbon/notebmac.cpp diff --git a/src/mac/carbon/notebmac.cpp b/src/mac/carbon/notebmac.cpp index 7de1af74e1..39693f9d0b 100644 --- a/src/mac/carbon/notebmac.cpp +++ b/src/mac/carbon/notebmac.cpp @@ -467,14 +467,18 @@ void wxNotebook::MacSetupTabs() OSErr err = SetIconFamilyData( iconFamily, 'PICT' , (Handle) info.u.picture ) ; wxASSERT_MSG( err == noErr , wxT("Error when adding bitmap") ) ; IconRef iconRef ; - err = RegisterIconRefFromIconFamily( 'WXNG' , (OSType) 1 , iconFamily, &iconRef ) ; + err = RegisterIconRefFromIconFamily( 'WXNG' , (OSType) 1, iconFamily, &iconRef ) ; wxASSERT_MSG( err == noErr , wxT("Error when adding bitmap") ) ; info.contentType = kControlContentIconRef ; info.u.iconRef = iconRef ; SetControlData( (ControlHandle) m_macControl, ii+1,kControlTabImageContentTag, sizeof( info ), (Ptr)&info ); wxASSERT_MSG( err == noErr , wxT("Error when setting icon on tab") ) ; - UnregisterIconRef( 'WXNG' , (OSType) 1 ) ; + if ( UMAGetSystemVersion() <= 0x1030 ) + { + UnregisterIconRef( 'WXNG' , (OSType) 1 ) ; + } + ReleaseIconRef( iconRef ) ; DisposeHandle( (Handle) iconFamily ) ; }