[pango/line-breaker] layout: Silently accept negative width
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/line-breaker] layout: Silently accept negative width
- Date: Sun, 23 Jan 2022 17:14:37 +0000 (UTC)
commit f46fb0f48e3f8a3620ab12c706c9683ef9b8d374
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jan 23 12:09:16 2022 -0500
layout: Silently accept negative width
pango/pango-layout.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index da4cb0c4..f5587a6c 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -1003,7 +1003,9 @@ pango_layout_set_width (PangoLayout *layout,
int width)
{
g_return_if_fail (PANGO_IS_LAYOUT (layout));
- g_return_if_fail (width >= -1);
+
+ if (width < -1)
+ width = -1;
if (layout->width == width)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]