diff options
author | Monsta <[email protected]> | 2014-11-28 19:12:18 +0300 |
---|---|---|
committer | infirit <[email protected]> | 2014-11-30 22:12:27 +0100 |
commit | 4ce6c682d8b6d90ec1e862c796687a44ee1ca6c1 (patch) | |
tree | 8b73e446ee1502845bf30d6185ac14431022d7c3 /capplets/keyboard | |
parent | aa5d7267ff72af5ed760a543f3885cdd078b6a2d (diff) | |
download | mate-control-center-4ce6c682d8b6d90ec1e862c796687a44ee1ca6c1.tar.bz2 mate-control-center-4ce6c682d8b6d90ec1e862c796687a44ee1ca6c1.tar.xz |
fix weird logic, prevent memleak
Diffstat (limited to 'capplets/keyboard')
-rw-r--r-- | capplets/keyboard/mate-keyboard-properties-xkb.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/capplets/keyboard/mate-keyboard-properties-xkb.c b/capplets/keyboard/mate-keyboard-properties-xkb.c index 4f795719..7ccc0273 100644 --- a/capplets/keyboard/mate-keyboard-properties-xkb.c +++ b/capplets/keyboard/mate-keyboard-properties-xkb.c @@ -61,10 +61,8 @@ set_model_text (GtkWidget * picker, gchar * value) XklConfigItem *ci = xkl_config_item_new (); char *model = NULL; - if (value != NULL) { + if (value != NULL && value[0] != '\0') { model = g_strdup(value); - if (model != NULL && model[0] == '\0') - model = NULL; } if (model == NULL) { |