summaryrefslogtreecommitdiff
path: root/src/core/stdmsg
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2014-08-06 15:32:31 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2014-08-06 15:32:31 +0000
commit4e5ba6e4a963960b7e013130786b7e801b66b475 (patch)
treea968396b5b5afbac99bce7c7250a29fb58bdbd99 /src/core/stdmsg
parent89b94807ee9eb27a382c5e9167499f6279e1d351 (diff)
Fix for message window API (same as [7067] for Scriver)
git-svn-id: http://svn.miranda-ng.org/main/trunk@10093 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r--src/core/stdmsg/src/msgs.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index 66c8f739cb..0223d8be8e 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -365,11 +365,12 @@ static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam)
static INT_PTR GetWindowData(WPARAM wParam, LPARAM lParam)
{
MessageWindowInputData *mwid = (MessageWindowInputData*)wParam;
+ if (mwid == NULL || (mwid->cbSize != sizeof(MessageWindowInputData)) || (mwid->hContact == NULL) || (mwid->uFlags != MSG_WINDOW_UFLAG_MSG_BOTH))
+ return 1;
+
MessageWindowData *mwd = (MessageWindowData*)lParam;
- if (mwid == NULL || mwd == NULL) return 1;
- if (mwid->cbSize != sizeof(MessageWindowInputData) || mwd->cbSize != sizeof(SrmmWindowData)) return 1;
- if (mwid->hContact == NULL) return 1;
- if (mwid->uFlags != MSG_WINDOW_UFLAG_MSG_BOTH) return 1;
+ if(mwd == NULL || (mwd->cbSize != sizeof(MessageWindowData)))
+ return 1;
HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, mwid->hContact);
mwd->uFlags = MSG_WINDOW_UFLAG_MSG_BOTH;