From 29cb9aedcc59725de8277640b2be0c8bca9392e1 Mon Sep 17 00:00:00 2001 From: Gabor de Mooij Date: Fri, 30 Aug 2024 15:04:48 +0200 Subject: [PATCH] Refrain from text rendering if no surface has been set in image object. --- plugins/media/media.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/media/media.c b/plugins/media/media.c index d52b7ac8..ce74b495 100644 --- a/plugins/media/media.c +++ b/plugins/media/media.c @@ -2748,6 +2748,7 @@ void ctr_internal_img_render_cursor(ctr_object* focusObject) { void ctr_internal_img_render_text(ctr_object* myself) { MediaIMG* image = ctr_internal_get_image_from_object(myself); if (image == NULL) return; + if (image->surface == NULL) return; int begin, end, len; ctr_internal_media_get_selection(&begin, &end); len = end - begin;