summaryrefslogtreecommitdiff
path: root/plugins/ContactsPlus
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ContactsPlus')
-rw-r--r--plugins/ContactsPlus/src/utils.cpp7
1 files changed, 3 insertions, 4 deletions
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;