summaryrefslogtreecommitdiff
path: root/gtk/gtktreeview.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2006-04-13 04:31:51 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-04-13 04:31:51 +0000
commit7b19dcbe7938e30a0acc3e6ef9c780e3752b4301 (patch)
tree475ad25696bddae4cc03080070a91426d5b1809b /gtk/gtktreeview.c
parent3014a278ed8bc3b3b24ee3f5407b2b67f4c7664c (diff)
downloadgdk-pixbuf-7b19dcbe7938e30a0acc3e6ef9c780e3752b4301.tar.gz
Reorganize slightly to avoid a possible NULL dereference. (Coverity)
2006-04-13 Matthias Clasen <mclasen@redhat.com> * gtk/gtktreeview.c (gtk_tree_view_header_focus): Reorganize slightly to avoid a possible NULL dereference. (Coverity)
Diffstat (limited to 'gtk/gtktreeview.c')
-rw-r--r--gtk/gtktreeview.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 3949bc481..c53d0e010 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -6855,9 +6855,10 @@ gtk_tree_view_header_focus (GtkTreeView *tree_view,
{
for (tmp_list = tree_view->priv->columns; tmp_list; tmp_list = tmp_list->next)
if (GTK_TREE_VIEW_COLUMN (tmp_list->data)->button == focus_child)
- break;
-
- tree_view->priv->focus_column = GTK_TREE_VIEW_COLUMN (tmp_list->data);
+ {
+ tree_view->priv->focus_column = GTK_TREE_VIEW_COLUMN (tmp_list->data);
+ break;
+ }
/* If the following isn't true, then the view is smaller then the scrollpane.
*/