[Xfce4-commits] [xfce/xfce4-session] 02/04: Check the return value of gtk_tree_selection_get_selected

noreply at xfce.org noreply at xfce.org
Mon Sep 22 08:23:36 CEST 2014


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository xfce/xfce4-session.

commit a35307fac4c16c4c5d1640e10bbe9769a0bfd262
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Tue Sep 16 20:13:48 2014 +0300

    Check the return value of gtk_tree_selection_get_selected
---
 xfce4-session/xfsm-chooser.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/xfce4-session/xfsm-chooser.c b/xfce4-session/xfsm-chooser.c
index 5c346df..7f7c1e9 100644
--- a/xfce4-session/xfsm-chooser.c
+++ b/xfce4-session/xfsm-chooser.c
@@ -118,7 +118,11 @@ xfsm_chooser_get_session (const XfsmChooser *chooser)
 
   bzero (&value, sizeof (value));
   selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (chooser->tree));
-  gtk_tree_selection_get_selected (selection, &model, &iter);
+  if (!gtk_tree_selection_get_selected (selection, &model, &iter))
+    {
+      g_warning ("xfsm_chooser_get_session: !gtk_tree_selection_get_selected");
+      return NULL;
+    }
   gtk_tree_model_get_value (model, &iter, NAME_COLUMN, &value);
   name = g_value_dup_string (&value);
   g_value_unset (&value);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list