summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-01 12:56:19 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-01 12:56:19 +0000
commitb06547d53a6148fd4e1ac74d000828a8e72684cc (patch)
treebba731680cfa3c497ac90b462fa35923f98cf64b /plugins
parent055d4460e17344248c7364afc5d19deeda39d644 (diff)
crash fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@7439 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/TabSRMM/src/globals.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index 895ea2797a..01c572e268 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -624,7 +624,11 @@ void CGlobals::RestoreUnreadMessageAlerts(void)
void CGlobals::logStatusChange(WPARAM wParam, const CContactCache *c)
{
- if (c == 0 || !c->isValid())
+ if (c == 0)
+ return;
+
+ TWindowData *dat = c->getDat();
+ if (dat == NULL || !c->isValid())
return;
HANDLE hContact = c->getContact();
@@ -663,7 +667,7 @@ void CGlobals::logStatusChange(WPARAM wParam, const CContactCache *c)
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.timestamp = time(NULL);
dbei.szModule = const_cast<char *>(c->getProto());
- StreamInEvents(c->getDat()->hwnd, NULL, 1, 1, &dbei);
+ StreamInEvents(dat->hwnd, NULL, 1, 1, &dbei);
}
/**