diff options
Diffstat (limited to 'platform/qt/src/qmapboxgl.cpp')
-rw-r--r-- | platform/qt/src/qmapboxgl.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/qt/src/qmapboxgl.cpp b/platform/qt/src/qmapboxgl.cpp index edb8afa28a..1f4ad3b456 100644 --- a/platform/qt/src/qmapboxgl.cpp +++ b/platform/qt/src/qmapboxgl.cpp @@ -1510,7 +1510,9 @@ void QMapboxGL::render() #endif // The OpenGL implementation automatically enables the OpenGL context for us. - mbgl::BackendScope scope { *d_ptr, mbgl::BackendScope::ScopeType::Implicit }; + if (!d_ptr->backendScope) { + d_ptr->backendScope = std::make_unique<mbgl::BackendScope>(*d_ptr, mbgl::BackendScope::ScopeType::Implicit); + } d_ptr->dirty = false; d_ptr->mapObj->render(*d_ptr); |