diff options
author | Julian Rex <julian.rex@mapbox.com> | 2018-07-10 09:12:52 -0400 |
---|---|---|
committer | Julian Rex <julian.rex@mapbox.com> | 2018-08-29 10:44:52 -0400 |
commit | f10c7e2a5bb0295f3f08216e69d3dd52083f7efd (patch) | |
tree | 710d558940148852d882c559929072ecbb4aceac | |
parent | e4826e690b4918a337029d9c2e2012ba1e6ac924 (diff) | |
download | qtlocation-mapboxgl-f10c7e2a5bb0295f3f08216e69d3dd52083f7efd.tar.gz |
Bail early if snapshotter completion block is NULL.
-rw-r--r-- | platform/darwin/src/MGLMapSnapshotter.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/darwin/src/MGLMapSnapshotter.mm b/platform/darwin/src/MGLMapSnapshotter.mm index e8ffe054a6..eff15dfcec 100644 --- a/platform/darwin/src/MGLMapSnapshotter.mm +++ b/platform/darwin/src/MGLMapSnapshotter.mm @@ -187,7 +187,8 @@ const CGFloat MGLSnapshotterMinimumPixelSize = 64; strongSelf.loading = false; - MGLMapSnapshotCompletionHandler callback = strongSelf.completion; + if (!strongSelf.completion) + return; if (mbglError) { NSString *description = @(mbgl::util::toString(mbglError).c_str()); |