Don't destroy glx if it's not initialized

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-06-06 07:27:30 +01:00
parent b947a45d71
commit 5e8d6bdc2d
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 3 additions and 1 deletions

View File

@ -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
}