From b06547d53a6148fd4e1ac74d000828a8e72684cc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 1 Jan 2014 12:56:19 +0000 Subject: crash fix git-svn-id: http://svn.miranda-ng.org/main/trunk@7439 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/globals.cpp | 8 ++++++-- 1 file 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(c->getProto()); - StreamInEvents(c->getDat()->hwnd, NULL, 1, 1, &dbei); + StreamInEvents(dat->hwnd, NULL, 1, 1, &dbei); } /** -- cgit v1.2.3