summaryrefslogtreecommitdiff
path: root/src/modules/metacontacts/meta_menu.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-03 20:32:43 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-03 20:32:43 +0000
commitf2a05888a258cf7a9cc1ea0b000641215839ac76 (patch)
tree174793368a87f057c6832d2eb76905e40c5610ef /src/modules/metacontacts/meta_menu.cpp
parent8cba703fce9767d341310c8e881ca87c6e2d5171 (diff)
metacontact creation fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@8391 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/metacontacts/meta_menu.cpp')
-rw-r--r--src/modules/metacontacts/meta_menu.cpp5
1 files changed, 5 insertions, 0 deletions
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);