summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/geometry/line_atlas.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mbgl/geometry/line_atlas.cpp b/src/mbgl/geometry/line_atlas.cpp
index dc5ee0901a..b516723cd9 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<std::recursive_mutex> lock(mtx);
- Environment::Get().abandonTexture(texture);
- texture = 0;
+ if (texture) {
+ Environment::Get().abandonTexture(texture);
+ texture = 0;
+ }
}
LinePatternPos LineAtlas::getDashPosition(const std::vector<float> &dasharray, bool round) {