Make lost GL context checking more robust, fixes thread race between layers and renderers
@@ -9,8 +9,8 @@ namespace carto {
}
bool GLResource::isValid() const {
- if (_manager.lock()) {
- return true;
+ if (auto manager = _manager.lock()) {
+ return manager->getGLThreadId() != std::thread::id();
}
return false;
}
