From f2a05888a258cf7a9cc1ea0b000641215839ac76 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 3 Mar 2014 20:32:43 +0000 Subject: metacontact creation fix git-svn-id: http://svn.miranda-ng.org/main/trunk@8391 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/metacontacts/meta_menu.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/modules/metacontacts/meta_menu.cpp') diff --git a/src/modules/metacontacts/meta_menu.cpp b/src/modules/metacontacts/meta_menu.cpp index 79500d7325..217d7b1895 100644 --- a/src/modules/metacontacts/meta_menu.cpp +++ b/src/modules/metacontacts/meta_menu.cpp @@ -60,7 +60,12 @@ INT_PTR Meta_Convert(WPARAM wParam, LPARAM lParam) // Create a new metacontact MCONTACT hMetaContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0); if (hMetaContact) { + DBCachedContact *cc = currDb->m_cache->GetCachedContact(hMetaContact); + if (cc == NULL) + return 0; + db_set_dw(hMetaContact, META_PROTO, "NumContacts", 0); + cc->nSubs = 0; // Add the MetaContact protocol to the new meta contact CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hMetaContact, (LPARAM)META_PROTO); -- cgit v1.2.3