File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -469,10 +469,13 @@ + (void)log:(NSString *)theMessage {
469469 NSNumber *sumNumber = [arguments objectForKey: @" s" ];
470470 float sumFloat = [sumNumber floatValue ];
471471
472- NSMutableDictionary *dict = [[ NSMutableDictionary alloc ] init ] ;
472+ NSMutableDictionary *dict = nil ;
473473 NSArray *segments = [arguments objectForKey: @" g" ];
474- for (int i = 0 , il = (int )segments.count ; i < il; i += 2 ) {
475- dict[[segments objectAtIndex: i]] = [segments objectAtIndex: i + 1 ];
474+ if (segments != nil ) {
475+ dict = [[NSMutableDictionary alloc ] init ];
476+ for (int i = 0 , il = (int )segments.count ; i < il; i += 2 ) {
477+ dict[[segments objectAtIndex: i]] = [segments objectAtIndex: i + 1 ];
478+ }
476479 }
477480 [[Countly sharedInstance ] endEvent: eventName segmentation: dict count: countInt sum: sumFloat];
478481 });
You can’t perform that action at this time.
0 commit comments