diff options
author | Mike Morris <michael.patrick.morris@gmail.com> | 2014-09-11 09:59:08 -0400 |
---|---|---|
committer | Mike Morris <michael.patrick.morris@gmail.com> | 2014-09-11 09:59:08 -0400 |
commit | 1f7c591bc45d95f9bdecc109fd4a3ddf6592e42d (patch) | |
tree | 634637ec0f7f5ed0e24591ddd71c6cb45d2d9864 /common | |
parent | f93a230e977522eba42046a2f6511cb776861aa7 (diff) | |
download | qtlocation-mapboxgl-1f7c591bc45d95f9bdecc109fd4a3ddf6592e42d.tar.gz |
clear_buffers in make_inactive, call make_inactive in destructor
Diffstat (limited to 'common')
-rw-r--r-- | common/headless_view.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/headless_view.cpp b/common/headless_view.cpp index ff903939b7..563fd8f245 100644 --- a/common/headless_view.cpp +++ b/common/headless_view.cpp @@ -148,6 +148,8 @@ void HeadlessView::clear_buffers() { } HeadlessView::~HeadlessView() { + make_inactive(); + #if MBGL_USE_CGL CGLDestroyContext(gl_context); #endif @@ -179,6 +181,8 @@ void HeadlessView::make_active() { } void HeadlessView::make_inactive() { + clear_buffers(); + #if MBGL_USE_CGL CGLError error = CGLSetCurrentContext(nullptr); if (error) { |