[pango/line-breaker] layout: Silently accept negative width



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]