diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-06-17 16:54:04 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-06-17 17:07:17 -0700 |
commit | 66c415a267b52ced77d3953b5bbf3a36481c52e3 (patch) | |
tree | ecfb2f5da6b3e8fbebddf5f3170edef236fc2811 /src/mbgl | |
parent | fd58861fcd0d71534e4fed2eeada8802cd36fbd0 (diff) | |
download | qtlocation-mapboxgl-66c415a267b52ced77d3953b5bbf3a36481c52e3.tar.gz |
Don't abandon a null texture
Diffstat (limited to 'src/mbgl')
-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) { |