From 4ff57f3585bcd7b1089405e44d4f8e3c93ff2a71 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 21 Dec 2013 16:42:58 +0000 Subject: minor fix for Contacts git-svn-id: http://svn.miranda-ng.org/main/trunk@7319 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/ContactsPlus/src/utils.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'plugins/ContactsPlus') diff --git a/plugins/ContactsPlus/src/utils.cpp b/plugins/ContactsPlus/src/utils.cpp index e72c1ed7b3..b050c28f76 100644 --- a/plugins/ContactsPlus/src/utils.cpp +++ b/plugins/ContactsPlus/src/utils.cpp @@ -57,13 +57,12 @@ char* __fastcall null_strdup(const char *string) TCHAR* GetContactUID(HANDLE hContact) { - DBVARIANT vrUid; - char *szProto = GetContactProto(hContact); - char *uid = (char*)CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0); // v0.3+ only - if (((INT_PTR)uid != CALLSERVICE_NOTFOUND) || uid == 0) + char *uid = (char*)CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0); + if (INT_PTR(uid) == CALLSERVICE_NOTFOUND || uid == 0) return NULL; + DBVARIANT vrUid; if (db_get_s(hContact, szProto, uid, &vrUid, 0)) return NULL; -- cgit v1.2.3