Skip to content

Commit

Permalink
Refrain from text rendering if no surface has been set in image object.
Browse files Browse the repository at this point in the history
  • Loading branch information
gabordemooij committed Aug 30, 2024
1 parent 658dbf0 commit 29cb9ae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plugins/media/media.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 29cb9ae

Please sign in to comment.