Don't abandon a null texture

This commit is contained in:
John Firebaugh
2015-06-17 16:54:04 -07:00
committed by Thiago Marcos P. Santos
parent 0cce08b67b
commit 3ef8d8728e

View File

@@ -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) {