[Xfce4-commits] <xfce4-xkb-plugin:master> Don't leak dialog.

Jérôme Guelfucci noreply at xfce.org
Fri Apr 29 11:38:06 CEST 2011


Updating branch refs/heads/master
         to a7b1e7f6b0ab29f4c360d484978234abb1fa0b42 (commit)
       from 24f66fa4d9dddbf8210b964a6a95c193792a87c0 (commit)

commit a7b1e7f6b0ab29f4c360d484978234abb1fa0b42
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date:   Fri Apr 29 10:41:48 2011 +0200

    Don't leak dialog.

 panel-plugin/xkb-settings-dialog.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/panel-plugin/xkb-settings-dialog.c b/panel-plugin/xkb-settings-dialog.c
index 0ee372d..6b15ce6 100644
--- a/panel-plugin/xkb-settings-dialog.c
+++ b/panel-plugin/xkb-settings-dialog.c
@@ -852,7 +852,10 @@ xkb_settings_layout_dialog_run (void)
         model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view));
 
         if (!gtk_tree_selection_get_selected (selection, &model, &iter))
+        {
+            gtk_widget_destroy (dialog);
             return NULL;
+        }
         gtk_tree_model_get (model, &iter, AVAIL_LAYOUT_TREE_COL_ID, &id, -1);
 
         tree_path = gtk_tree_model_get_path (model, &iter);
@@ -866,6 +869,7 @@ xkb_settings_layout_dialog_run (void)
             {
                 g_free (id);
                 gtk_tree_path_free (tree_path);
+                gtk_widget_destroy (dialog);
                 return NULL;
             }
 
@@ -873,6 +877,7 @@ xkb_settings_layout_dialog_run (void)
             {
                 g_free (id);
                 gtk_tree_path_free (tree_path);
+                gtk_widget_destroy (dialog);
                 return NULL;
             }
 



More information about the Xfce4-commits mailing list