From 9a54276a37224e454bde7441cf6764cc8bdd8672 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Wed, 7 Oct 2009 20:46:16 +0000 Subject: [PATCH] Make sure that the source implements groups support prior than querying it for groups. Monotone-Parent: e1d0bc18ecaf333b66126f3d3f7d8dfdb0580d70 Monotone-Revision: 8e6238fb5afca88582d8e5b9645e8f690b18ddd8 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2009-10-07T20:46:16 Monotone-Branch: ca.inverse.sogo --- SoObjects/SOGo/SOGoGroup.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SoObjects/SOGo/SOGoGroup.m b/SoObjects/SOGo/SOGoGroup.m index 2fd3a3ae0..839e8092f 100644 --- a/SoObjects/SOGo/SOGoGroup.m +++ b/SoObjects/SOGo/SOGoGroup.m @@ -128,9 +128,12 @@ for (i = 0; i < [allSources count]; i++) { source = [[SOGoUserManager sharedUserManager] sourceWithID: [allSources objectAtIndex: i]]; - entry = [source performSelector: theSelector - withObject: theValue]; + // Our different sources might not all implements groups support + if ([source respondsToSelector: theSelector]) + entry = [source performSelector: theSelector + withObject: theValue]; + if (entry) break;