From 41ca3061eb739eb5f929dbbd1f72e3904cb52d5d Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Thu, 15 Nov 2012 16:59:35 +0000 Subject: crash fix git-svn-id: http://svn.miranda-ng.org/main/trunk@2315 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/mTextControl/src/FormattedTextDraw.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/mTextControl') diff --git a/plugins/mTextControl/src/FormattedTextDraw.cpp b/plugins/mTextControl/src/FormattedTextDraw.cpp index f40edb1d00..fe8b0b27ea 100644 --- a/plugins/mTextControl/src/FormattedTextDraw.cpp +++ b/plugins/mTextControl/src/FormattedTextDraw.cpp @@ -215,14 +215,14 @@ HRESULT CFormattedTextDraw::get_NaturalSize(void *hdcDraw, long *Width, long *He cf.bCharSet = lf.lfCharSet; cf.yHeight = 1440 * abs(lf.lfHeight) / GetDeviceCaps((HDC)hdcDraw, LOGPIXELSY); wsprintf(cf.szFaceName, lf.lfFaceName); - m_spTextServices->TxSendMessage(EM_SETCHARFORMAT, (WPARAM)(SCF_ALL), (LPARAM)&cf, &lResult); - - SIZEL szExtent; -// HDC hdcDraw; if (!m_spTextServices) return S_FALSE; + m_spTextServices->TxSendMessage(EM_SETCHARFORMAT, (WPARAM)(SCF_ALL), (LPARAM)&cf, &lResult); + + SIZEL szExtent; +// HDC hdcDraw; // hdcDraw = GetDC(NULL); *Height = 1; szExtent.cx = *Width; -- cgit v1.2.3