]> Pileus Git - ~andy/gtk/commitdiff
Set model in all cases. (#357791, Andreas Köhler)
authorMatthias Clasen <mclasen@redhat.com>
Mon, 2 Oct 2006 01:29:24 +0000 (01:29 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 2 Oct 2006 01:29:24 +0000 (01:29 +0000)
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)

gtk/gtktreeselection.c

index e7aad5bff7de32c6ca01bbc240438405c076790f..d5aad37c8b1253ac71f5f6f59e849903a2fc8b6e 100644 (file)
@@ -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)