summaryrefslogtreecommitdiff
path: root/plugins/MirandaG15/src/CAppletManager.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-04-15 19:45:07 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-04-15 19:45:07 +0000
commitda985f982d63b06db8784199105f73bc0a4d6fc6 (patch)
tree0db5197388ed0b69847259488f6abf52277eb7f1 /plugins/MirandaG15/src/CAppletManager.cpp
parent9e3ba523300180641ef7a22f791bd3ae89ec4785 (diff)
MirandaG15:
- minor bugfixes git-svn-id: http://svn.miranda-ng.org/main/trunk@12843 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirandaG15/src/CAppletManager.cpp')
-rw-r--r--plugins/MirandaG15/src/CAppletManager.cpp7
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;