diff options
Diffstat (limited to 'plugins/MirandaG15/src/CAppletManager.cpp')
-rw-r--r-- | plugins/MirandaG15/src/CAppletManager.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp index dbc34fd1c3..4596306b56 100644 --- a/plugins/MirandaG15/src/CAppletManager.cpp +++ b/plugins/MirandaG15/src/CAppletManager.cpp @@ -1205,9 +1205,10 @@ int CAppletManager::HookChatInbound(WPARAM wParam,LPARAM lParam) GCEVENT *gce = (GCEVENT*)lParam; GCDEST *gcd; - if (gce == NULL || gce->pDest == NULL) + if (gce == NULL || (gcd = gce->pDest) == NULL) { TRACE(_T("<< [%s] skipping invalid event\n")); - gcd = (GCDEST*)gce->pDest; + return 0; + } TRACE(_T("<< [%s:%s] event %04X\n"),toTstring(gcd->pszModule).c_str(), gcd->ptszID, gcd->iType); @@ -1484,7 +1485,7 @@ int CAppletManager::HookChatInbound(WPARAM wParam,LPARAM lParam) if(pHistory) { tstring strChannel = pHistory->strChannel; - if(CConfig::GetBoolSetting(NOTIFY_CHANNELCUTOFF) && strNick.length() > CConfig::GetIntSetting(NOTIFY_CHANNELCUTOFF_OFFSET)) { + if(CConfig::GetBoolSetting(NOTIFY_CHANNELCUTOFF) && strChannel.length() > CConfig::GetIntSetting(NOTIFY_CHANNELCUTOFF_OFFSET)) { strChannel = strChannel.erase(CConfig::GetIntSetting(NOTIFY_CHANNELCUTOFF_OFFSET)) + _T("..."); } Event.strDescription = strChannel + _T(" - ")+Event.strValue; |