diff --git a/src/osx/carbon/utilscocoa.mm b/src/osx/carbon/utilscocoa.mm index 95b3573120..bf7392e892 100644 --- a/src/osx/carbon/utilscocoa.mm +++ b/src/osx/carbon/utilscocoa.mm @@ -168,10 +168,7 @@ void wxNativeFontInfo::ValidateNSFontDescriptor() { desc = [desc fontDescriptorWithSymbolicTraits:traits]; } - else - { - wxMacCocoaRetain(desc); - } + wxMacCocoaRetain(desc); m_nsFontDescriptor = desc; } @@ -179,7 +176,7 @@ WX_NSFont wxFont::CreateNSFont(const wxNativeFontInfo* info) { NSFont* nsFont; nsFont = [NSFont fontWithDescriptor:info->m_nsFontDescriptor size:info->m_pointSize]; - + wxMacCocoaRetain(nsFont); return nsFont; }