From 3d3a3c6963cad50dbc055af02bce66b77e812d7b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Mar 2014 07:04:04 +0000 Subject: fix for removing subs on contact deletion git-svn-id: http://svn.miranda-ng.org/main/trunk@8540 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/metacontacts/meta_services.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/modules/metacontacts/meta_services.cpp') 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; } -- cgit v1.2.3