diff --git a/common/lib/gterm.c b/common/lib/gterm.c index 523debec..b5016edc 100644 --- a/common/lib/gterm.c +++ b/common/lib/gterm.c @@ -804,8 +804,10 @@ no_load_font:; pmm_free(font, FONT_MAX); - image_close(background); - background = NULL; + if (background != NULL) { + image_close(background); + background = NULL; + } if (terms_i == 0) { return false;