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
This commit is contained in:
@@ -742,8 +742,11 @@ wxSize wxFont::GetPixelSize() const
|
|||||||
|
|
||||||
bool wxFont::IsFixedWidth() 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<wxFont *>(this)->RealizeResource();
|
||||||
|
|
||||||
return M_FONTDATA->IsFixedWidth();
|
return M_FONTDATA->IsFixedWidth();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user