[anjuta] libanjuta: Fix a critical warning when selecting a node in chooser widget



commit e3c6858776fe1351dc6f879310534aafe49556f3
Author: SÃbastien Granjoux <seb sfo free fr>
Date:   Sat Jan 7 12:21:59 2012 +0100

    libanjuta: Fix a critical warning when selecting a node in chooser widget

 libanjuta/anjuta-tree-combo.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/libanjuta/anjuta-tree-combo.c b/libanjuta/anjuta-tree-combo.c
index 8b2c322..f282321 100644
--- a/libanjuta/anjuta-tree-combo.c
+++ b/libanjuta/anjuta-tree-combo.c
@@ -862,11 +862,14 @@ anjuta_tree_combo_box_get_active_iter (AnjutaTreeComboBox *combo,
 	GtkTreePath *path;
 	gboolean valid = FALSE;
 
-	path = gtk_tree_row_reference_get_path (priv->active_row);
-	if (path)
+	if (priv->active_row != NULL)
 	{
-		valid = gtk_tree_model_get_iter (priv->model, iter, path);
-		gtk_tree_path_free (path);
+		path = gtk_tree_row_reference_get_path (priv->active_row);
+		if (path)
+		{
+			valid = gtk_tree_model_get_iter (priv->model, iter, path);
+			gtk_tree_path_free (path);
+		}
 	}
 
 	return valid;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]