[Xfce4-commits] <xfce4-xkb-plugin:master> Fix warning when destroying NULL hashtable.

Jérôme Guelfucci noreply at xfce.org
Thu Apr 28 23:58:01 CEST 2011


Updating branch refs/heads/master
         to 6e173f2530d65d5c4820997739f62676caf2d065 (commit)
       from 4eead9775d4688104e1b77cf443381734b1fa652 (commit)

commit 6e173f2530d65d5c4820997739f62676caf2d065
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date:   Thu Apr 28 23:02:15 2011 +0200

    Fix warning when destroying NULL hashtable.

 panel-plugin/xkb-config.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c
index 78fb9e5..353ad8a 100644
--- a/panel-plugin/xkb-config.c
+++ b/panel-plugin/xkb-config.c
@@ -222,10 +222,14 @@ xkb_config_free (void)
         g_free (config->variants);
     }
 
-    g_hash_table_destroy (config->variant_index_by_group);
+    if (config->variant_index_by_group)
+        g_hash_table_destroy (config->variant_index_by_group);
 
-    g_hash_table_destroy (config->window_map);
-    g_hash_table_destroy (config->application_map);
+    if (config->window_map)
+        g_hash_table_destroy (config->window_map);
+
+    if (config->application_map)
+        g_hash_table_destroy (config->application_map);
 }
 
 void



More information about the Xfce4-commits mailing list