diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-06-17 16:54:04 -0700 |
---|---|---|
committer | Thiago Marcos P. Santos <thiago@mapbox.com> | 2015-06-18 13:39:18 +0300 |
commit | 3ef8d8728e8da787484e49c2d082f7af63cfd717 (patch) | |
tree | 5484b9aa260f3acd99fb8fbb116695526c21b16d /src/mbgl/geometry/line_atlas.cpp | |
parent | 0cce08b67b7c10c14ce5b0a6fca01d46dcebda9a (diff) | |
download | qtlocation-mapboxgl-3ef8d8728e8da787484e49c2d082f7af63cfd717.tar.gz |
Don't abandon a null texture
Diffstat (limited to 'src/mbgl/geometry/line_atlas.cpp')
-rw-r--r-- | src/mbgl/geometry/line_atlas.cpp | 6 |
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) { |