GetFaceName() could be called for a font that hadn't been really used yet and
hence its wxFontRefData::m_hFont could be 0 and couldn't be used in
GetMSWFaceName().
Fix this by using GetHFONT() accessor instead of m_hFont directly to create
the font if necessary.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69106
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxString GetMSWFaceName() const
{
ScreenHDC hdc;
- SelectInHDC selectFont(hdc, m_hFont);
+ SelectInHDC selectFont(hdc, (HFONT)GetHFONT());
UINT otmSize = GetOutlineTextMetrics(hdc, 0, NULL);
if ( !otmSize )