summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-08-29 18:04:23 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-08-29 18:04:23 -0400
commit41eac9414a8ac4f4a72eb9c57fcb3df5e0945731 (patch)
treec4779d8f6f0352a554bfcac6e3b56e88a7a8804e /utils
parentd37bfbfeaa900c0c95a42244a04785127f404a19 (diff)
downloadpango-41eac9414a8ac4f4a72eb9c57fcb3df5e0945731.tar.gz
pango-view: Don't draw the empty run
Diffstat (limited to 'utils')
-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,