summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Leege <bleege@gmail.com>2015-05-20 14:18:39 -0500
committerBrad Leege <bleege@gmail.com>2015-05-20 14:18:39 -0500
commit44caf2c7a97bc3b1314cc88dbf2c66ddaf5da2b0 (patch)
tree808e585e48ba9d36bf8682553753e082396b7d97
parenta5bd2fa3c66991ff31ba5d4091eb8400f6fc4397 (diff)
downloadqtlocation-mapboxgl-44caf2c7a97bc3b1314cc88dbf2c66ddaf5da2b0.tar.gz
#1595 - Improving stability by moving MGLEventTypeAppUserTurnstile after the strongSelf check
-rw-r--r--platform/ios/MGLMapboxEvents.m10
1 files changed, 5 insertions, 5 deletions
diff --git a/platform/ios/MGLMapboxEvents.m b/platform/ios/MGLMapboxEvents.m
index 364a051809..6b15df145a 100644
--- a/platform/ios/MGLMapboxEvents.m
+++ b/platform/ios/MGLMapboxEvents.m
@@ -433,6 +433,10 @@ const NSTimeInterval MGLFlushInterval = 60;
dispatch_async(_serialQueue, ^{
+ MGLMapboxEvents *strongSelf = weakSelf;
+
+ if ( ! strongSelf) return;
+
if ([MGLEventTypeAppUserTurnstile isEqualToString:event]) {
// Build only IDFV event
NSString *vid = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
@@ -442,15 +446,11 @@ const NSTimeInterval MGLFlushInterval = 60;
[_eventQueue addObject:vevt];
// Flush
- [MGLMapboxEvents flush];
+ [self flush];
return;
}
- MGLMapboxEvents *strongSelf = weakSelf;
-
- if ( ! strongSelf) return;
-
// Metrics Collection Has Been Paused
if (_paused) {
return;