summaryrefslogtreecommitdiff
path: root/metacontacts/meta_utils.c
diff options
context:
space:
mode:
author(no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10>2008-02-17 23:02:50 +0000
committer(no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10>2008-02-17 23:02:50 +0000
commit497d9deafacde174f27e094121c3acf57d4f1b83 (patch)
tree058274512320cd1a21cb26a8da5f69f4561640a8 /metacontacts/meta_utils.c
parentc2403bb16070d73eefe2b54efea9f674266ffdd1 (diff)
Fixed crash (Scott take a look at it I think logic needs to change)
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@399 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'metacontacts/meta_utils.c')
-rw-r--r--metacontacts/meta_utils.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/metacontacts/meta_utils.c b/metacontacts/meta_utils.c
index 2c00ddc..e6d1706 100644
--- a/metacontacts/meta_utils.c
+++ b/metacontacts/meta_utils.c
@@ -1182,14 +1182,17 @@ void Meta_RestoreGroup(HANDLE hContact) {
}
void Meta_SetGroup(HANDLE hContact) {
- char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *proto, *uid;
if(meta_group_hack_disabled) return; // clist has called api function to disable group hack - yay!
// the existence of this service means that clist_meta_mw is active and will do the hiding for us
if(ServiceExists(MS_CLUI_METASUPPORT)) return;
- if(proto && !strcmp(JABBER_UNIQUE_ID_SETTING, (char *)CallProtoService(proto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0))) {
+ proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ uid = (char *)CallProtoService(proto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
+
+ if(proto && uid && (int)uid != CALLSERVICE_NOTFOUND && !strcmp(JABBER_UNIQUE_ID_SETTING, uid)) {
// if it's a jabber contact, hide it, and record the fact that it was us who did
DBWriteContactSettingByte(hContact, META_PROTO, "Hidden", 1);
DBWriteContactSettingByte(hContact, "CList", "Hidden", 1);