fix for sigsegv in case of show_tabs == NULL

Tue Aug 18 17:22:22 1998  Lars Hamann  <lars@gtk.org>

	* gtk/gtknotebook.c (gtk_notebook_switch_focus_tab):
	* gtk/gtknotebook.c (gtk_notebook_update_labels): fix for sigsegv
	in case of show_tabs == NULL
This commit is contained in:
Lars Hamann 1998-08-18 15:31:49 +00:00 committed by Lars Hamann
parent 7f2909bbab
commit 1575a19c59
8 changed files with 46 additions and 3 deletions

View File

@ -1,3 +1,9 @@
Tue Aug 18 17:22:22 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_switch_focus_tab):
* gtk/gtknotebook.c (gtk_notebook_update_labels): fix for sigsegv
in case of show_tabs == NULL
Tue Aug 18 03:54:43 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): restricted the --g*fatal-* arguments

View File

@ -1,3 +1,9 @@
Tue Aug 18 17:22:22 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_switch_focus_tab):
* gtk/gtknotebook.c (gtk_notebook_update_labels): fix for sigsegv
in case of show_tabs == NULL
Tue Aug 18 03:54:43 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): restricted the --g*fatal-* arguments

View File

@ -1,3 +1,9 @@
Tue Aug 18 17:22:22 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_switch_focus_tab):
* gtk/gtknotebook.c (gtk_notebook_update_labels): fix for sigsegv
in case of show_tabs == NULL
Tue Aug 18 03:54:43 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): restricted the --g*fatal-* arguments

View File

@ -1,3 +1,9 @@
Tue Aug 18 17:22:22 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_switch_focus_tab):
* gtk/gtknotebook.c (gtk_notebook_update_labels): fix for sigsegv
in case of show_tabs == NULL
Tue Aug 18 03:54:43 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): restricted the --g*fatal-* arguments

View File

@ -1,3 +1,9 @@
Tue Aug 18 17:22:22 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_switch_focus_tab):
* gtk/gtknotebook.c (gtk_notebook_update_labels): fix for sigsegv
in case of show_tabs == NULL
Tue Aug 18 03:54:43 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): restricted the --g*fatal-* arguments

View File

@ -1,3 +1,9 @@
Tue Aug 18 17:22:22 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_switch_focus_tab):
* gtk/gtknotebook.c (gtk_notebook_update_labels): fix for sigsegv
in case of show_tabs == NULL
Tue Aug 18 03:54:43 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): restricted the --g*fatal-* arguments

View File

@ -1,3 +1,9 @@
Tue Aug 18 17:22:22 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_switch_focus_tab):
* gtk/gtknotebook.c (gtk_notebook_update_labels): fix for sigsegv
in case of show_tabs == NULL
Tue Aug 18 03:54:43 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): restricted the --g*fatal-* arguments

View File

@ -3324,7 +3324,7 @@ gtk_notebook_switch_focus_tab (GtkNotebook *notebook,
}
}
if (!notebook->focus_tab)
if (!notebook->show_tabs || !notebook->focus_tab)
return;
if (old_tab)
@ -3432,8 +3432,9 @@ gtk_notebook_update_labels (GtkNotebook *notebook,
gtk_label_set (GTK_LABEL (page->tab_label), string);
if (notebook->menu && page->default_menu)
{
if (GTK_IS_LABEL (page->tab_label))
gtk_label_set (GTK_LABEL (page->menu_label), GTK_LABEL (page->tab_label)->label);
if (page->tab_label && GTK_IS_LABEL (page->tab_label))
gtk_label_set (GTK_LABEL (page->menu_label),
GTK_LABEL (page->tab_label)->label);
else
gtk_label_set (GTK_LABEL (page->menu_label), string);
}