diff --git a/src/msw/font.cpp b/src/msw/font.cpp index bbf7d849a6..6c747e821e 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -149,7 +149,8 @@ public: { // cache the face name, it shouldn't change unless the family // does and wxNativeFontInfo::SetFamily() resets the face name - const_cast(this)->SetFaceName(facename); + // Don't call this->SetFaceName(), because it deletes the HFONT. + const_cast(m_nativeFontInfo).SetFaceName(facename); } }