From 5e8d6bdc2d2a5fd809fabc41129cdda28c87b8ae Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Thu, 6 Jun 2019 07:27:30 +0100 Subject: [PATCH] Don't destroy glx if it's not initialized Signed-off-by: Yuxuan Shui --- src/render.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/render.c b/src/render.c index 9c0f4cc1..e33568b7 100644 --- a/src/render.c +++ b/src/render.c @@ -1221,7 +1221,9 @@ void deinit_render(session_t *ps) { #ifdef CONFIG_OPENGL free(ps->root_tile_paint.fbcfg); - glx_destroy(ps); + if (bkend_use_glx(ps)) { + glx_destroy(ps); + } #endif }