From 497d9deafacde174f27e094121c3acf57d4f1b83 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> Date: Sun, 17 Feb 2008 23:02:50 +0000 Subject: 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 --- metacontacts/meta_utils.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'metacontacts/meta_utils.c') 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); -- cgit v1.2.3