From: Vadim Zeitlin Date: Fri, 19 Oct 2012 11:06:14 +0000 (+0000) Subject: Remove assert checking for valid font in wxMSW wxDC::GetTextExtent(). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4f21fcb1ae62cc301060f52654f815e6a44c26c9 Remove assert checking for valid font in wxMSW wxDC::GetTextExtent(). It wasn't there before wxTextMEasure changes and it doesn't seem obvious why should it be there, it should be possible to measure the text using the default wxDC font without setting one explicitly. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index fc47bd9a5a..74eec510d4 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -1867,8 +1867,6 @@ void wxMSWDCImpl::DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y bool wxMSWDCImpl::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const { - wxCHECK_MSG( GetFont().IsOk(), false, wxT("Invalid font") ); - wxTextMeasure txm(GetOwner(), NULL); // don't change the font return txm.GetPartialTextExtents(text, widths, 1.0); }