summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-10-28 15:40:58 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-10-28 15:54:36 -0700
commitd20bcb07957edc008d452db8ef5c91baa117bce6 (patch)
tree93b9c39e53c1613e2399f92fdb23ba859acd4207 /src
parent014b517820b935137d1f6cf654c42fb041ee2d71 (diff)
downloadqtlocation-mapboxgl-d20bcb07957edc008d452db8ef5c91baa117bce6.tar.gz
[core] Workaround for #2808
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/annotation/annotation_manager.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mbgl/annotation/annotation_manager.cpp b/src/mbgl/annotation/annotation_manager.cpp
index 374d770a29..e5c55c90dd 100644
--- a/src/mbgl/annotation/annotation_manager.cpp
+++ b/src/mbgl/annotation/annotation_manager.cpp
@@ -83,6 +83,9 @@ LatLngBounds AnnotationManager::getBoundsForAnnotations(const AnnotationIDs& ids
}
std::unique_ptr<AnnotationTile> AnnotationManager::getTile(const TileID& tileID) {
+ if (pointAnnotations.empty() && shapeAnnotations.empty())
+ return nullptr;
+
auto tile = std::make_unique<AnnotationTile>();
AnnotationTileLayer& pointLayer = *tile->layers.emplace(