diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-10-06 04:07:37 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-10-06 04:07:37 (EDT) |
commit | e04ac5728204339ec85fee64a48b88e112beeccc (patch) | |
tree | e320d1300f60bb9963b16ff1f8aaa9bc3694b4d7 /src | |
parent | b7740a9484dc30563b8b2691543705e8727d9ebb (diff) | |
download | marquee-e04ac5728204339ec85fee64a48b88e112beeccc.zip marquee-e04ac5728204339ec85fee64a48b88e112beeccc.tar.gz marquee-e04ac5728204339ec85fee64a48b88e112beeccc.tar.bz2 |
src/web-settings.c: Initialize GValue structs before g_value_init()
Fixes:
(marquee:xxxxx): GLib-GObject-WARNING **: [...]: cannot initialize GValue with type 'gboolean', the value has already been initialized as '(null)'
(marquee:xxxxx): GLib-GObject-CRITICAL **: g_value_set_boolean: assertion 'G_VALUE_HOLDS_BOOLEAN (value)' failed
Diffstat (limited to 'src')
-rw-r--r-- | src/web-settings.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/web-settings.c b/src/web-settings.c index fc8a24d..e0d8ebd 100644 --- a/src/web-settings.c +++ b/src/web-settings.c @@ -155,7 +155,7 @@ static GHashTable *mappings_table = NULL; static void bool_cb(const gchar *name, const gboolean value, WebKitSettings *wk_settings) { - GValue g_value; + GValue g_value = G_VALUE_INIT; g_value_init(&g_value, G_TYPE_BOOLEAN); g_value_set_boolean(&g_value, value); @@ -166,7 +166,7 @@ bool_cb(const gchar *name, const gboolean value, WebKitSettings *wk_settings) static void bool_n_cb(const gchar *name, const gboolean value, WebKitSettings *wk_settings) { - GValue g_value; + GValue g_value = G_VALUE_INIT; g_value_init(&g_value, G_TYPE_BOOLEAN); g_value_set_boolean(&g_value, value); @@ -177,7 +177,7 @@ bool_n_cb(const gchar *name, const gboolean value, WebKitSettings *wk_settings) static void int_cb(const gchar *name, const gint value, WebKitSettings *wk_settings) { - GValue g_value; + GValue g_value = G_VALUE_INIT; g_value_init(&g_value, G_TYPE_INT); g_value_set_int(&g_value, value); @@ -188,7 +188,7 @@ int_cb(const gchar *name, const gint value, WebKitSettings *wk_settings) static void str_cb(const gchar *name, const gchar *value, WebKitSettings *wk_settings) { - GValue g_value; + GValue g_value = G_VALUE_INIT; g_value_init(&g_value, G_TYPE_STRING); g_value_set_static_string(&g_value, value); |