diff options
-rw-r--r-- | common/headless_view.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/headless_view.cpp b/common/headless_view.cpp index 9dee14b393..3fc3816f07 100644 --- a/common/headless_view.cpp +++ b/common/headless_view.cpp @@ -148,11 +148,13 @@ void HeadlessView::clear_buffers() { XFreePixmap(x_display, x_pixmap); x_pixmap = 0; } + + make_inactive(); #endif } HeadlessView::~HeadlessView() { - make_inactive(); + clear_buffers(); #if MBGL_USE_CGL CGLDestroyContext(gl_context); |