summaryrefslogtreecommitdiff
path: root/gtk/gtknotebook.c
diff options
context:
space:
mode:
authorLars Hamann <lars@gtk.org>1998-08-18 15:31:49 +0000
committerLars Hamann <lars@src.gnome.org>1998-08-18 15:31:49 +0000
commit1575a19c592471888d2603df65149799aadb4601 (patch)
tree5b6147a8a8e94f380a047da0d0c8f60ebd9c9053 /gtk/gtknotebook.c
parent7f2909bbab8294c98338ee5512db520c48ced929 (diff)
downloadgtk+-1575a19c592471888d2603df65149799aadb4601.tar.gz
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
Diffstat (limited to 'gtk/gtknotebook.c')
-rw-r--r--gtk/gtknotebook.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index e63e4ed00c..7f8ea7ed45 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -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);
}