summaryrefslogtreecommitdiffstats
path: root/gtk/src/values.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/src/values.c')
-rw-r--r--gtk/src/values.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gtk/src/values.c b/gtk/src/values.c
index dd23d0e48..f755363e5 100644
--- a/gtk/src/values.c
+++ b/gtk/src/values.c
@@ -322,7 +322,14 @@ ghb_string_value(const gchar *str)
static GValue gval = {0,};
if (!G_IS_VALUE(&gval))
g_value_init(&gval, G_TYPE_STRING);
- g_value_set_string(&gval, str);
+ if (str == NULL)
+ {
+ g_value_set_string(&gval, "");
+ }
+ else
+ {
+ g_value_set_string(&gval, str);
+ }
return &gval;
}