From 1f7c591bc45d95f9bdecc109fd4a3ddf6592e42d Mon Sep 17 00:00:00 2001 From: Mike Morris Date: Thu, 11 Sep 2014 09:59:08 -0400 Subject: clear_buffers in make_inactive, call make_inactive in destructor --- common/headless_view.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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) { -- cgit v1.2.1