From a29c0966140a912e6ecf0197d1f04915ac0dcc56 Mon Sep 17 00:00:00 2001 From: Massimo Valentini Date: Tue, 13 Mar 2012 20:42:59 +0100 Subject: [PATCH] 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: N T click on canvas type something select the text entered and change its color using the color button from the text style editor --- app/widgets/gimptextstyleeditor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/widgets/gimptextstyleeditor.c b/app/widgets/gimptextstyleeditor.c index f99c99aa6a..1f8da6eeb3 100644 --- a/app/widgets/gimptextstyleeditor.c +++ b/app/widgets/gimptextstyleeditor.c @@ -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,