From 8f3736fbfd8e7664854ca3f0cb81b51829aef99f Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 13 Sep 2016 15:40:55 -0700 Subject: [PATCH] [core] Band-aid to prevent GeometryTile::redoLayout race condition from causing a crash (#6322) --- src/mbgl/tile/tile_worker.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mbgl/tile/tile_worker.cpp b/src/mbgl/tile/tile_worker.cpp index 8fe75d71d..d67eac954 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.