aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2017-11-26 17:45:30 +0100
committerThomas White <taw@bitwiz.org.uk>2017-11-26 17:45:30 +0100
commit86e80d221809201f4cab608c5312bce8c76618a8 (patch)
treed889b223d1fa27efe4b8ede15ee83e9cad08ddfc /src
parentafa0a93f42bb7f1a4b66ae8ee48ca72e5afc48c0 (diff)
Don't crash if image is not found
Diffstat (limited to 'src')
-rw-r--r--src/frame.c4
1 files changed, 3 insertions, 1 deletions
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 :