X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e45080c10b11190028e843b617564caec95e82dd..e388dc214c74a5ac2d3c4d5f810fcfbd5f7fa01a:/src/mac/carbon/icon.cpp diff --git a/src/mac/carbon/icon.cpp b/src/mac/carbon/icon.cpp index a19042a3e5..c90a0b37c7 100644 --- a/src/mac/carbon/icon.cpp +++ b/src/mac/carbon/icon.cpp @@ -220,7 +220,11 @@ bool wxIcon::LoadFile( HLock((Handle) iconFamily); OSStatus err = GetIconRefFromIconFamilyPtr( *iconFamily, GetHandleSize((Handle) iconFamily), &iconRef ); HUnlock((Handle) iconFamily); - wxASSERT_MSG( err == noErr , wxT("Error when constructing icon ref") ); + if ( err != noErr ) + { + wxFAIL_MSG("Error when constructing icon ref"); + } + ReleaseResource( resHandle ) ; } }