summaryrefslogtreecommitdiff
path: root/plugins/mTextControl/src
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2012-11-15 16:59:35 +0000
committerKirill Volinsky <mataes2007@gmail.com>2012-11-15 16:59:35 +0000
commit41ca3061eb739eb5f929dbbd1f72e3904cb52d5d (patch)
treeade84f8c565fd8438a9b5085156785c44073d18d /plugins/mTextControl/src
parent1de3ae85316769fbe2dcee0d6fbcd86af9681ced (diff)
crash fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@2315 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/mTextControl/src')
-rw-r--r--plugins/mTextControl/src/FormattedTextDraw.cpp8
1 files changed, 4 insertions, 4 deletions
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;