From: Václav Slavík Date: Fri, 2 Jul 2004 19:38:13 +0000 (+0000) Subject: BCC compilation fix X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2d17baae34e212fd96e3a0d6f6baad417f89ca27 BCC compilation fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 93bb8f27c8..345427d25a 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1671,7 +1671,11 @@ void wxWindowMSW::GetTextExtent(const wxString& string, 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));