GNOME Bugzilla – Bug 397327
pango-layout.c: 'pango_layout_is_ellipsized' must return a value
Last modified: 2007-01-16 18:11:00 UTC
Please describe the problem: 'pango_layout_is_ellipsized' returns with a booelan. But 'g_return_if_fail' returns without a value. 'g_return_val_if_fail' should be used. Steps to reproduce: 1. compile pango-layout.c 2. pango_layout_is_ellipsized (NULL); Actual results: If layout is NULL, pango_layout_is_ellipsized returns a unknown value. Expected results: Use 'g_return_val_if_fail'. For example, gboolean pango_layout_is_ellipsized (PangoLayout *layout) { g_return_val_if_fail (layout != NULL, FALSE); pango_layout_check_lines (layout); return layout->is_ellipsized; } Does this happen every time? /trunk/pango/pango-layout.c Other information:
Thanks. 2007-01-16 Behdad Esfahbod <behdad@gnome.org> Bug 397327 – pango-layout.c: 'pango_layout_is_ellipsized' must return a value * pango/pango-layout.c (pango_layout_is_ellipsized): Use g_return_val_if_fail() instead of g_return_if_fail().