diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-09-13 15:40:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-13 15:40:55 -0700 |
commit | 8f3736fbfd8e7664854ca3f0cb81b51829aef99f (patch) | |
tree | af206b5824db9b603bbdeb3b55fe4e4205609f75 /src/mbgl/tile | |
parent | 1a2680b5b7033d0ec39adbd2837f7339038d85d4 (diff) | |
download | qtlocation-mapboxgl-8f3736fbfd8e7664854ca3f0cb81b51829aef99f.tar.gz |
[core] Band-aid to prevent GeometryTile::redoLayout race condition from causing a crash (#6322)
Diffstat (limited to 'src/mbgl/tile')
-rw-r--r-- | src/mbgl/tile/tile_worker.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mbgl/tile/tile_worker.cpp b/src/mbgl/tile/tile_worker.cpp index 8fe75d71d4..d67eac954b 100644 --- a/src/mbgl/tile/tile_worker.cpp +++ b/src/mbgl/tile/tile_worker.cpp @@ -136,6 +136,12 @@ void TileWorker::parseLayer(const Layer* layer) { if (obsolete) return; + // Temporary prevention for crashing due to https://github.com/mapbox/mapbox-gl-native/issues/6263. + // Instead, the race condition will produce a blank tile. + if (!tileData) { + return; + } + auto geometryLayer = tileData->getLayer(layer->baseImpl->sourceLayer); if (!geometryLayer) { // The layer specified in the bucket does not exist. Do nothing. |