Set model in all cases. (#357791, Andreas Köhler)

2006-10-01  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeselection.c (gtk_tree_selection_get_selected_rows):
	Set model in all cases.  (#357791, Andreas Köhler)
This commit is contained in:
Matthias Clasen
2006-10-02 01:27:25 +00:00
committed by Matthias Clasen
parent 26366d713d
commit 8bf4caf83c
2 changed files with 10 additions and 5 deletions

View File

@@ -1,3 +1,8 @@
2006-10-01 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeselection.c (gtk_tree_selection_get_selected_rows):
Set model in all cases. (#357791, Andreas Köhler)
2006-10-01 Tor Lillqvist <tml@novell.com>
* gtk/gtkfilesystemwin32.c: Same change as to gtkfilesystemunix.c.

View File

@@ -402,8 +402,8 @@ gtk_tree_selection_get_selected (GtkTreeSelection *selection,
* Since: 2.2
**/
GList *
gtk_tree_selection_get_selected_rows (GtkTreeSelection *selection,
GtkTreeModel **model)
gtk_tree_selection_get_selected_rows (GtkTreeSelection *selection,
GtkTreeModel **model)
{
GList *list = NULL;
GtkRBTree *tree = NULL;
@@ -413,13 +413,13 @@ gtk_tree_selection_get_selected_rows (GtkTreeSelection *selection,
g_return_val_if_fail (GTK_IS_TREE_SELECTION (selection), NULL);
g_return_val_if_fail (selection->tree_view != NULL, NULL);
if (model)
*model = selection->tree_view->priv->model;
if (selection->tree_view->priv->tree == NULL ||
selection->tree_view->priv->tree->root == NULL)
return NULL;
if (model)
*model = selection->tree_view->priv->model;
if (selection->type == GTK_SELECTION_NONE)
return NULL;
else if (selection->type != GTK_SELECTION_MULTIPLE)