summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src/messages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/New_GPG/src/messages.cpp')
-rwxr-xr-xplugins/New_GPG/src/messages.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp
index 3890e57e45..e80bc328ee 100755
--- a/plugins/New_GPG/src/messages.cpp
+++ b/plugins/New_GPG/src/messages.cpp
@@ -791,10 +791,13 @@ int HookSendMsg(WPARAM w, LPARAM l)
{
if(!l)
return 0;
- DBEVENTINFO * dbei = (DBEVENTINFO*)l;
+ MessageWindowEvent *ev = (MessageWindowEvent*)l;
+ DBEVENTINFO * dbei = ev->dbei;
+ if(!dbei)
+ return 0;
if(dbei->eventType != EVENTTYPE_MESSAGE)
return 0;
- MCONTACT hContact = (MCONTACT)w;
+ MCONTACT hContact = ev->hContact;
if(dbei->flags & DBEF_SENT)
{
if(isContactSecured(hContact) && strstr((char*)dbei->pBlob, "-----BEGIN PGP MESSAGE-----")) //our service data, can be double added by metacontacts e.t.c.