[pango/wip/baedert/for-master2: 5/17] layotu: Avoid invalidating when setting attrs from NULL to NULL
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/wip/baedert/for-master2: 5/17] layotu: Avoid invalidating when setting attrs from NULL to NULL
- Date: Mon, 8 Jun 2020 17:21:31 +0000 (UTC)
commit 62fd1b58c79e11077ac8b03c2eeaae3cec84e976
Author: Timm Bäder <mail baedert org>
Date: Wed Apr 15 15:14:47 2020 +0200
layotu: Avoid invalidating when setting attrs from NULL to NULL
pango/pango-layout.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 24b492fe..7a25494b 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -679,11 +679,15 @@ pango_layout_get_line_spacing (PangoLayout *layout)
**/
void
pango_layout_set_attributes (PangoLayout *layout,
- PangoAttrList *attrs)
+ PangoAttrList *attrs)
{
PangoAttrList *old_attrs;
+
g_return_if_fail (layout != NULL);
+ if (!attrs && !layout->attrs)
+ return;
+
old_attrs = layout->attrs;
/* We always clear lines such that this function can be called
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]