summaryrefslogtreecommitdiff
path: root/utils/viewer-pangocairo.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/viewer-pangocairo.c')
-rw-r--r--utils/viewer-pangocairo.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/viewer-pangocairo.c b/utils/viewer-pangocairo.c
index a6a416ee..ce1e1983 100644
--- a/utils/viewer-pangocairo.c
+++ b/utils/viewer-pangocairo.c
@@ -346,8 +346,13 @@ render_callback (PangoLayout *layout,
iter = pango_layout_get_iter (layout);
do
{
+ PangoLayoutRun *run;
PangoRectangle rect;
+ run = pango_layout_iter_get_run (iter);
+ if (!run)
+ continue;
+
pango_layout_iter_get_run_extents (iter, NULL, &rect);
cairo_rectangle (cr,
(double)rect.x / PANGO_SCALE - lw / 2,