[pango/matthiasc/for-main: 2/5] pango-view: Don't draw the empty run
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/matthiasc/for-main: 2/5] pango-view: Don't draw the empty run
- Date: Sun, 29 Aug 2021 22:36:11 +0000 (UTC)
commit 41eac9414a8ac4f4a72eb9c57fcb3df5e0945731
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Aug 29 18:04:23 2021 -0400
pango-view: Don't draw the empty run
utils/viewer-pangocairo.c | 5 +++++
1 file changed, 5 insertions(+)
---
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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]