diff options
author | Matthias Clasen <mclasen@redhat.com> | 2006-07-02 15:12:40 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2006-07-02 15:12:40 +0000 |
commit | a0482815e7334943abe09e541b1e6215f2560965 (patch) | |
tree | f4c324d72ebc6f6f331da4870e26c337a41ff8f5 /gtk | |
parent | f75f53f940814bd8e09a2335b63d300386106b98 (diff) | |
download | gtk+-a0482815e7334943abe09e541b1e6215f2560965.tar.gz |
Remove redundant assignments to page, which may cause NULL dereferences.
2006-06-30 Matthias Clasen <mclasen@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_tab_space): Remove
redundant assignments to page, which may cause NULL
dereferences. (#346334, Dave Vasilevsky)
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtknotebook.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index a846aa29db..c032a89238 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -4683,7 +4683,6 @@ gtk_notebook_tab_space (GtkNotebook *notebook, { GtkNotebookPrivate *priv; GtkWidget *widget; - GtkNotebookPage *page; GList *children; gint tab_pos = get_effective_tab_pos (notebook); gint tab_overlap; @@ -4710,6 +4709,8 @@ gtk_notebook_tab_space (GtkNotebook *notebook, while (children) { + GtkNotebookPage *page; + page = children->data; children = children->next; @@ -4725,6 +4726,8 @@ gtk_notebook_tab_space (GtkNotebook *notebook, while (children) { + GtkNotebookPage *page; + page = children->data; children = children->next; @@ -4748,7 +4751,6 @@ gtk_notebook_tab_space (GtkNotebook *notebook, if (*tab_space > *max - *min - tab_overlap) { *show_arrows = TRUE; - page = notebook->focus_tab->data; /* take arrows into account */ *tab_space = widget->allocation.width - tab_overlap - @@ -4784,7 +4786,6 @@ gtk_notebook_tab_space (GtkNotebook *notebook, if (*tab_space > *max - *min - tab_overlap) { *show_arrows = TRUE; - page = notebook->focus_tab->data; /* take arrows into account */ *tab_space = widget->allocation.height - |