summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/VKontakte/src/misc.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 40570adf24..d2fed8d7b8 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -35,6 +35,9 @@ void CVkProto::SetAllContactStatuses(int iStatus)
MCONTACT CVkProto::FindUser(LONG dwUserid, bool bCreate)
{
+ if (!dwUserid)
+ return NULL;
+
for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
LONG dbUserid = getDword(hContact, "ID", -1);
if (dbUserid == -1)