summaryrefslogtreecommitdiff
path: root/platform/default/mbgl
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-02-17 11:17:26 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-02-20 12:04:21 -0800
commit773f330774db50ea82d2eb2e59b4250d67d7e4dc (patch)
tree4850dd799d6effe6c2aad56f758432d82f7e9216 /platform/default/mbgl
parent535457262011f3790069c8426e7b143f3aba26d0 (diff)
downloadqtlocation-mapboxgl-773f330774db50ea82d2eb2e59b4250d67d7e4dc.tar.gz
[core] Ensure that context resources are destroyed before context is destroyed
Diffstat (limited to 'platform/default/mbgl')
-rw-r--r--platform/default/mbgl/gl/headless_backend.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/platform/default/mbgl/gl/headless_backend.cpp b/platform/default/mbgl/gl/headless_backend.cpp
index 61225d54a1..c105fd6b84 100644
--- a/platform/default/mbgl/gl/headless_backend.cpp
+++ b/platform/default/mbgl/gl/headless_backend.cpp
@@ -1,5 +1,7 @@
#include <mbgl/gl/headless_backend.hpp>
#include <mbgl/gl/headless_display.hpp>
+#include <mbgl/gl/context.hpp>
+#include <mbgl/map/backend_scope.hpp>
#include <cassert>
#include <stdexcept>
@@ -15,6 +17,8 @@ HeadlessBackend::HeadlessBackend(std::shared_ptr<HeadlessDisplay> display_)
}
HeadlessBackend::~HeadlessBackend() {
+ BackendScope scope(*this);
+ context.reset();
}
void HeadlessBackend::activate() {