diff options
author | René Schümann <white06tiger@gmail.com> | 2014-12-28 02:26:37 +0000 |
---|---|---|
committer | René Schümann <white06tiger@gmail.com> | 2014-12-28 02:26:37 +0000 |
commit | 694afa43f43644b56e4311ace732e71e6c9ccf0c (patch) | |
tree | 35fece3ac6abe354c4c04e972a69d17e307fa24c | |
parent | b911d7c915bf145edc156e59c69cafebc668b8dd (diff) |
SendSS/UserInfoEx: ! fixed potential crash in r11651
git-svn-id: http://svn.miranda-ng.org/main/trunk@11660 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/SendScreenshotPlus/src/dlg_msgbox.cpp | 2 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/dlg_msgbox.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp index f070c8df37..21ccafa73a 100644 --- a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp +++ b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp @@ -252,7 +252,7 @@ static INT_PTR CALLBACK MsgBoxProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l SelectObject(hDC, hNormalFont); // get message text width and height - for (rs=h=pMsgBox->ptszMsg; ; ++h) { + if(pMsgBox->ptszMsg) for (rs=h=pMsgBox->ptszMsg; ; ++h) { if (*h=='\n' || !*h) { GetTextExtentPoint32(hDC, rs, h-rs, &ts); if (ts.cx > txtWidth) diff --git a/plugins/UserInfoEx/src/dlg_msgbox.cpp b/plugins/UserInfoEx/src/dlg_msgbox.cpp index 9b674d763d..556db4b377 100644 --- a/plugins/UserInfoEx/src/dlg_msgbox.cpp +++ b/plugins/UserInfoEx/src/dlg_msgbox.cpp @@ -236,7 +236,7 @@ static INT_PTR CALLBACK MsgBoxProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l SelectObject(hDC, hNormalFont);
// get message text width and height
- for (rs=h=pMsgBox->ptszMsg; ; ++h) {
+ if(pMsgBox->ptszMsg) for (rs=h=pMsgBox->ptszMsg; ; ++h) {
if (*h=='\n' || !*h) {
GetTextExtentPoint32(hDC, rs, h-rs, &ts);
if (ts.cx > txtWidth)
|