summaryrefslogtreecommitdiff
path: root/src/modules/metacontacts/meta_services.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-10 07:04:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-10 07:04:04 +0000
commit3d3a3c6963cad50dbc055af02bce66b77e812d7b (patch)
tree101c60f5cadeed0e28b91c491e9d454ee74a316a /src/modules/metacontacts/meta_services.cpp
parent14558d254a9e04b41002bb51e1ae4e46705f7ea4 (diff)
fix for removing subs on contact deletion
git-svn-id: http://svn.miranda-ng.org/main/trunk@8540 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/metacontacts/meta_services.cpp')
-rw-r--r--src/modules/metacontacts/meta_services.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/modules/metacontacts/meta_services.cpp b/src/modules/metacontacts/meta_services.cpp
index 0f08521b0c..c30b633790 100644
--- a/src/modules/metacontacts/meta_services.cpp
+++ b/src/modules/metacontacts/meta_services.cpp
@@ -476,8 +476,11 @@ int Meta_ContactDeleted(WPARAM hContact, LPARAM lParam)
// is a subcontact - update meta contact
if (cc->IsSub()) {
- Meta_RemoveContactNumber(cc, Meta_GetContactNumber(cc, hContact), true);
- NotifyEventHooks(hSubcontactsChanged, cc->parentID, 0);
+ DBCachedContact *ccMeta = CheckMeta(cc->parentID);
+ if (ccMeta) {
+ Meta_RemoveContactNumber(ccMeta, Meta_GetContactNumber(ccMeta, hContact), true);
+ NotifyEventHooks(hSubcontactsChanged, ccMeta->contactID, 0);
+ }
return 0;
}