summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src/icqosc_svcs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/IcqOscarJ/src/icqosc_svcs.cpp')
-rw-r--r--protocols/IcqOscarJ/src/icqosc_svcs.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/protocols/IcqOscarJ/src/icqosc_svcs.cpp b/protocols/IcqOscarJ/src/icqosc_svcs.cpp
index c5060ab1e4..df568a5b30 100644
--- a/protocols/IcqOscarJ/src/icqosc_svcs.cpp
+++ b/protocols/IcqOscarJ/src/icqosc_svcs.cpp
@@ -656,18 +656,15 @@ MCONTACT CIcqProto::AddToListByUID(const char *szUID, DWORD dwFlags)
{
int bAdded;
MCONTACT hContact = HContactFromUID(0, szUID, &bAdded);
- if (hContact)
- {
- if (!(dwFlags & PALF_TEMPORARY) && db_get_b(hContact, "CList", "NotOnList", 0))
- {
- setContactHidden(hContact, 0);
- db_unset(hContact, "CList", "NotOnList");
- }
-
- return hContact; // Success
+ if (hContact == 0)
+ return 0; // Failure
+
+ if (!(dwFlags & PALF_TEMPORARY) && db_get_b(hContact, "CList", "NotOnList", 0)) {
+ setContactHidden(hContact, 0);
+ db_unset(hContact, "CList", "NotOnList");
}
- return NULL; // Failure
+ return hContact; // Success
}