summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2018-04-27 13:55:34 -0400
committerJason Wray <jason@mapbox.com>2018-04-27 13:59:51 -0400
commit5e355ec29b1b9284a466928581bf1200ccbf65c6 (patch)
tree95d2673bcb5a155036264ca708e10dbaa9a57524
parent007aecd350cfa2efb09c1224cc3fc205fa121c8c (diff)
downloadqtlocation-mapboxgl-upstream/fb-xcode-9.3.tar.gz
Check strongSelf (instead of weakSelf)upstream/fb-xcode-9.3
-rw-r--r--platform/darwin/src/MGLMapSnapshotter.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/darwin/src/MGLMapSnapshotter.mm b/platform/darwin/src/MGLMapSnapshotter.mm
index 68bae4cd52..6449a7fd4f 100644
--- a/platform/darwin/src/MGLMapSnapshotter.mm
+++ b/platform/darwin/src/MGLMapSnapshotter.mm
@@ -146,10 +146,10 @@ const CGFloat MGLSnapshotterMinimumPixelSize = 64;
});
dispatch_async(queue, ^{
- if (!weakSelf) {
+ __typeof__(self) strongSelf = weakSelf;
+ if (!strongSelf) {
return;
}
- __typeof__(self) strongSelf = weakSelf;
strongSelf->_mbglMapSnapshotter->snapshot(strongSelf->_snapshotCallback->self());
});
}