Skip to content

Commit

Permalink
perform nil check before clearing geofences (#409)
Browse files Browse the repository at this point in the history
  • Loading branch information
lmeier authored Oct 30, 2024
1 parent 8c85b76 commit 8abf09d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RadarSDK/RadarLocationManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -511,14 +511,14 @@ - (void)removeBubbleGeofence {
}

- (void)replaceSyncedGeofences:(NSArray<RadarGeofence *> *)geofences {
[self removeSyncedGeofences];

if (!geofences) {
[[RadarLogger sharedInstance] logWithLevel:RadarLogLevelDebug message:@"Skipping replacing synced geofences"];

return;
}

[self removeSyncedGeofences];

RadarTrackingOptions *options = [Radar getTrackingOptions];
NSUInteger numGeofences = MIN(geofences.count, options.beacons ? 9 : 19);
NSMutableArray *requests = [NSMutableArray array];
Expand Down

0 comments on commit 8abf09d

Please sign in to comment.