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)
This commit is contained in:
Matthias Clasen 2006-07-02 15:12:40 +00:00 committed by Matthias Clasen
parent f75f53f940
commit a0482815e7
3 changed files with 12 additions and 3 deletions

View File

@ -1,5 +1,9 @@
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)
* demos/gtk-demo/editable_cells.c: Portability fix.
(#346375, Thomas Klausner)

View File

@ -1,5 +1,9 @@
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)
* demos/gtk-demo/editable_cells.c: Portability fix.
(#346375, Thomas Klausner)

View File

@ -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 -