git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28145
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxASSERT_MSG( !theFont || theFont->Ok(),
_T("invalid font in GetTextExtent()") );
wxASSERT_MSG( !theFont || theFont->Ok(),
_T("invalid font in GetTextExtent()") );
- const wxFont fontToUse(theFont ? *theFont : GetFont());
+ wxFont fontToUse;
+ if (theFont)
+ fontToUse = *theFont;
+ else
+ fontToUse = GetFont();
WindowHDC hdc(GetHwnd());
SelectInHDC selectFont(hdc, GetHfontOf(fontToUse));
WindowHDC hdc(GetHwnd());
SelectInHDC selectFont(hdc, GetHfontOf(fontToUse));