[gnome-control-center] keyboard: Fix warnings when clearing the help shortcut
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] keyboard: Fix warnings when clearing the help shortcut
- Date: Fri, 5 Sep 2014 08:06:21 +0000 (UTC)
commit 110bc2ebb5f1ac8b1ac5cf64668756dad5477ea6
Author: Bastien Nocera <hadess hadess net>
Date: Fri Sep 5 10:03:09 2014 +0200
keyboard: Fix warnings when clearing the help shortcut
(gnome-control-center:20334): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed
#0 g_logv (log_domain=0x7fffec6a040e "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>,
args=args entry=0x7fffffffd148) at gmessages.c:1046
#1 0x00007fffec63ca12 in g_log (log_domain=log_domain entry=0x7fffec6a040e "GLib", log_level=log_level
entry=G_LOG_LEVEL_CRITICAL, format=format entry=0x7fffec6a9cbd "%s: assertion '%s' failed") at
gmessages.c:1079
#2 0x00007fffec63ca39 in g_return_if_fail_warning (log_domain=log_domain entry=0x7fffec6a040e "GLib",
pretty_function=pretty_function entry=0x7fffec6fa860 <__FUNCTION__.5201> "g_variant_new_string",
expression=expression entry=0x7fffec6fc5f2 "string != NULL") at gmessages.c:1088
#3 0x00007fffec66890a in g_variant_new_string (string=string entry=0x0) at gvariant.c:1227
#4 0x00007fffecc34dd4 in g_settings_set_string (settings=settings entry=0x14b3640, key=key
entry=0x14caac0 "help", value=value entry=0x0) at gsettings.c:1708
#5 0x000000000047cd2e in settings_set_binding (value=0x0, key=0x14caac0 "help", settings=0x14b3640) at
cc-keyboard-item.c:117
#6 _set_binding (set_backend=1, value=<optimized out>, item=<optimized out>) at cc-keyboard-item.c:155
#7 cc_keyboard_item_set_property (object=<optimized out>, prop_id=<optimized out>, value=<optimized
out>, pspec=0x146e300) at cc-keyboard-item.c:204
#8 0x00007fffec93b3eb in object_set_property (nqueue=<optimized out>, value=<optimized out>,
pspec=<optimized out>, object=<optimized out>) at gobject.c:1415
#9 g_object_set_valist (object=0x149fc00, first_property_name=0x146e300 "\320\064\231",
var_args=0x7fffffffd378) at gobject.c:2159
#10 0x00007fffec93bc0f in g_object_set (_object=0x149fc00, first_property_name=first_property_name
entry=0x53a4a6 "binding") at gobject.c:2269
#11 0x0000000000479652 in accel_cleared_callback (cell=<optimized out>, path_string=<optimized out>,
data=<optimized out>) at keyboard-shortcuts.c:1625
panels/keyboard/cc-keyboard-item.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/panels/keyboard/cc-keyboard-item.c b/panels/keyboard/cc-keyboard-item.c
index fc1028e..b8fad76 100644
--- a/panels/keyboard/cc-keyboard-item.c
+++ b/panels/keyboard/cc-keyboard-item.c
@@ -114,7 +114,7 @@ settings_set_binding (GSettings *settings,
variant = g_settings_get_value (settings, key);
if (g_variant_is_of_type (variant, G_VARIANT_TYPE_STRING))
- g_settings_set_string (settings, key, value);
+ g_settings_set_string (settings, key, value ? value : "");
else if (g_variant_is_of_type (variant, G_VARIANT_TYPE_STRING_ARRAY))
{
char **str_array;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]