From 86e80d221809201f4cab608c5312bce8c76618a8 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sun, 26 Nov 2017 17:45:30 +0100 Subject: Don't crash if image is not found --- src/frame.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/frame.c b/src/frame.c index 56c0bcf..86e2733 100644 --- a/src/frame.c +++ b/src/frame.c @@ -636,7 +636,9 @@ void render_paragraph(cairo_t *cr, Paragraph *para, ImageStore *is) h = para->image_h; cairo_user_to_device_distance(cr, &w, &h); surf = lookup_image(is, para->filename, w); - render_from_surf(surf, cr, para->image_w, para->image_h, 0); + if ( surf != NULL ) { + render_from_surf(surf, cr, para->image_w, para->image_h, 0); + } break; case PARA_TYPE_CALLBACK : -- cgit v1.2.3