app: initialize also GimpRGB's alpha component

Conditional jump or move depends on uninitialised value(s)
==29000==    at 0x4C33CBC: gimp_color_area_set_color (gimp/libgimpwidgets/gimpcolorarea.c:425)
==29000==    by 0x4C3505B: gimp_color_button_set_color (gimp/libgimpwidgets/gimpcolorbutton.c:642)
==29000==    by 0x5DA5BE: gimp_text_style_editor_set_color (gimp/app/widgets/gimptextstyleeditor.c:700)
==29000==    by 0x5DB0D4: gimp_text_style_editor_update_idle (gimp/app/widgets/gimptextstyleeditor.c:1090)
==29000==    by 0x57E9E95: gdk_threads_dispatch (gtk-2-24/gdk/gdk.c:512)

Steps to reproduce:

<Ctrl>N <Enter> T
click on canvas
type something

select the text entered and change its color using
the color button from the text style editor
This commit is contained in:
Massimo Valentini
2012-03-13 20:42:59 +01:00
parent 62ebb4a1e5
commit a29c096614

View File

@ -693,10 +693,10 @@ gimp_text_style_editor_set_color (GimpTextStyleEditor *editor,
{
GimpRGB color;
gimp_rgba_set (&color, 0.0, 0.0, 0.0, 1.0);
if (color_tag)
gimp_text_tag_get_color (color_tag, &color);
else
gimp_rgb_set (&color, 0.0, 0.0, 0.0);
g_signal_handlers_block_by_func (editor->color_button,
gimp_text_style_editor_color_changed,