Fix uninitialized width variable.

2007-01-04  Behdad Esfahbod  <behdad@gnome.org>

        * gtk/gtklabel.c (get_layout_location): Fix uninitialized width
        variable.


svn path=/trunk/; revision=17069
This commit is contained in:
Behdad Esfahbod 2007-01-04 16:24:29 +00:00 committed by Behdad Esfahbod
parent c0614d3aa8
commit dcc2896f6d
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2007-01-04 Behdad Esfahbod <behdad@gnome.org>
* gtk/gtklabel.c (get_layout_location): Fix uninitialized width
variable.
2007-01-04 Matthias Clasen <mclasen@redhat.com>
* gtk/Makefile.am:

View File

@ -2298,11 +2298,11 @@ get_layout_location (GtkLabel *label,
int width;
PangoRectangle logical;
width = pango_layout_get_width (label->layout);
pango_layout_get_pixel_extents (label->layout, NULL, &logical);
req_width = logical.width;
if (width != -1)
req_width = MIN(PANGO_PIXELS (width), req_width);
/* width may be -1 */
req_width = MIN(PANGO_PIXELS (width), logical.width);
req_width += 2 * misc->xpad;
}
else