diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-11-15 16:59:35 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-11-15 16:59:35 +0000 |
commit | 41ca3061eb739eb5f929dbbd1f72e3904cb52d5d (patch) | |
tree | ade84f8c565fd8438a9b5085156785c44073d18d /plugins/mTextControl | |
parent | 1de3ae85316769fbe2dcee0d6fbcd86af9681ced (diff) |
crash fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@2315 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/mTextControl')
-rw-r--r-- | plugins/mTextControl/src/FormattedTextDraw.cpp | 8 |
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;
|