[pango/minor-fix] Handle analysis.font being NULL
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/minor-fix] Handle analysis.font being NULL
- Date: Wed, 19 Aug 2020 03:45:42 +0000 (UTC)
commit 0c25ed9998bb5c6f2f8134f4469daca460f76667
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Aug 18 23:44:21 2020 -0400
Handle analysis.font being NULL
I don't think this is a legitimate concern, but it is
faster to add a check than to argue about the use of
pango on fontless systems.
Fixes: #495
pango/pango-layout.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 92d858b2..7d5b9b10 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -3609,6 +3609,9 @@ find_hyphen_width (PangoItem *item)
hb_font_t *hb_font;
hb_codepoint_t glyph;
+ if (!item->analysis.font)
+ return 0;
+
/* This is not technically correct, since
* a) we may end up inserting a different hyphen
* b) we should reshape the entire run
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]