tFix for segfault in the case where gtk_rc_get_style returns NULL. - vaccinewar… | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 38ffefd3a56c63ece9ed2fe03e9d8371565cb3ae | |
parent 1b199ac41840a2fb61c471c0d7479967e1ec3a0a | |
Author: Ben Webb <[email protected]> | |
Date: Mon, 24 Jun 2002 17:57:48 +0000 | |
Fix for segfault in the case where gtk_rc_get_style returns NULL. | |
Diffstat: | |
M src/gtkport/gtkport.c | 6 +++++- | |
1 file changed, 5 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/src/gtkport/gtkport.c b/src/gtkport/gtkport.c | |
t@@ -5320,7 +5320,11 @@ GtkWidget *gtk_url_new(const gchar *text, const gchar *… | |
label = gtk_label_new(text); | |
/* Set the text colour */ | |
- style = gtk_style_copy(gtk_rc_get_style(label)); | |
+ style = gtk_rc_get_style(label); | |
+ if (!style) { | |
+ style = label->style; | |
+ } | |
+ style = gtk_style_copy(style); | |
style->fg[GTK_STATE_NORMAL] = color; | |
gtk_widget_set_style(label, style); | |