summaryrefslogtreecommitdiff
path: root/plugins/AVS/src/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/AVS/src/utils.cpp')
-rw-r--r--plugins/AVS/src/utils.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp
index e4ab45e2ff..f1a1809be5 100644
--- a/plugins/AVS/src/utils.cpp
+++ b/plugins/AVS/src/utils.cpp
@@ -508,14 +508,12 @@ protoPicCacheEntry *GetProtoDefaultAvatar(MCONTACT hContact)
MCONTACT GetContactThatHaveTheAvatar(MCONTACT hContact, int locked)
{
- if (db_get_b(NULL, META_PROTO, "Enabled", 0)) {
- if (db_get_dw(hContact, META_PROTO, "NumContacts", 0) >= 1) {
- if (locked == -1)
- locked = db_get_b(hContact, "ContactPhoto", "Locked", 0);
+ if (db_mc_isMeta(hContact)) {
+ if (locked == -1)
+ locked = db_get_b(hContact, "ContactPhoto", "Locked", 0);
- if (!locked)
- hContact = db_mc_getMostOnline(hContact);
- }
+ if (!locked)
+ hContact = db_mc_getMostOnline(hContact);
}
return hContact;
}