From 3ef8d8728e8da787484e49c2d082f7af63cfd717 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Wed, 17 Jun 2015 16:54:04 -0700 Subject: [PATCH] Don't abandon a null texture --- src/mbgl/geometry/line_atlas.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mbgl/geometry/line_atlas.cpp b/src/mbgl/geometry/line_atlas.cpp index dc5ee0901..b516723cd 100644 --- a/src/mbgl/geometry/line_atlas.cpp +++ b/src/mbgl/geometry/line_atlas.cpp @@ -21,8 +21,10 @@ LineAtlas::LineAtlas(uint16_t w, uint16_t h) LineAtlas::~LineAtlas() { std::lock_guard lock(mtx); - Environment::Get().abandonTexture(texture); - texture = 0; + if (texture) { + Environment::Get().abandonTexture(texture); + texture = 0; + } } LinePatternPos LineAtlas::getDashPosition(const std::vector &dasharray, bool round) {