]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1216 d1b88da0-ebda-0310...
authorwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 1 Nov 2007 22:36:11 +0000 (22:36 +0000)
committerwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 1 Nov 2007 22:36:11 +0000 (22:36 +0000)
SOPE/NGCards/CardGroup.m
SOPE/NGCards/ChangeLog

index be1c71e01da6e6641a879c1554d58acb1d883ae5..9571aa9b71458385f197a9ac235a04742c8afc9c 100644 (file)
@@ -72,26 +72,29 @@ static NGCardsSaxHandler *sax = nil;
   NSEnumerator *cards;
   CardGroup *currentCard;
 
-  cardParser = [self cardParser];
-  [sax setTopElementClass: [self class]];
+  cardGroups = nil;
 
-  if (parser)
+  if (source)
     {
-      cardGroups = [NSMutableArray new];
-      [cardGroups autorelease];
-      
-      [parser parseFromSource: source];
-      cards = [[sax cards] objectEnumerator];
-
-      currentCard = [cards nextObject];
-      while (currentCard)
-        {
-          [cardGroups addObject: currentCard];
-          currentCard = [cards nextObject];
-        }
+      cardParser = [self cardParser];
+      [sax setTopElementClass: [self class]];
+
+      if (parser)
+       {
+         cardGroups = [NSMutableArray new];
+         [cardGroups autorelease];
+         
+         [parser parseFromSource: source];
+         cards = [[sax cards] objectEnumerator];
+         
+         currentCard = [cards nextObject];
+         while (currentCard)
+           {
+             [cardGroups addObject: currentCard];
+             currentCard = [cards nextObject];
+           }
+       }
     }
-  else
-    cardGroups = nil;
 
   return cardGroups;
 }
index 09ec6734bef5339f21335d95cd725d6f1d57d239..801f22856203e2d2492d46643f308a9c395fa3af 100644 (file)
@@ -1,3 +1,9 @@
+2007-11-01  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
+
+       * CardGroup.m ([CardGroup +parseFromSource:source]): make sure the
+       given source is not nil, otherwise the parser will raise an
+       exception, which we don't want.
+
 2007-10-29  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
 
        * CardElement.m ([CardElement -value:anInt]): added handling for