From: Stefan Csomor Date: Wed, 20 Jun 2012 10:34:30 +0000 (+0000) Subject: make sure native font exists, before asking about fixed width X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/372d999e64cd127520216f6054df1ca9bb367cef make sure native font exists, before asking about fixed width git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/carbon/font.cpp b/src/osx/carbon/font.cpp index 11853c8e5e..a0a345c38f 100644 --- a/src/osx/carbon/font.cpp +++ b/src/osx/carbon/font.cpp @@ -742,8 +742,11 @@ wxSize wxFont::GetPixelSize() const bool wxFont::IsFixedWidth() const { - wxCHECK_MSG( M_FONTDATA != NULL , wxFONTWEIGHT_MAX, wxT("invalid font") ); + wxCHECK_MSG( M_FONTDATA != NULL , false, wxT("invalid font") ); + // cast away constness otherwise lazy font resolution is not possible + const_cast(this)->RealizeResource(); + return M_FONTDATA->IsFixedWidth(); }