Small bug in gtknotebook.c
- From: Dave Cole <dave dccs com au>
- To: gtk-devel-list redhat com
- Subject: Small bug in gtknotebook.c
- Date: 27 Nov 1998 01:23:23 +1100
When trying a program of mine with gtk+-1.1.5, I encountered a
segfault in gtknotebook.c
I do not have CVS access, so could someone have a look at this patch,
then apply it if it is correct?
- Dave
--- gtk+-1.1.5/gtk/gtknotebook.c Mon Nov 23 15:49:22 1998
+++ gtk+-1.1.5-mine/gtk/gtknotebook.c Fri Nov 27 01:14:35 1998
@@ -912,6 +912,7 @@
gtk_notebook_paint (widget, &event->area);
if (notebook->cur_page &&
+ notebook->cur_page->tab_label &&
gtk_widget_intersect (notebook->cur_page->tab_label,
&event->area, &child_area))
gtk_widget_draw_focus (widget);
@@ -2241,7 +2242,8 @@
page->tab_label->allocation.width + 1,
page->tab_label->allocation.height + 1);
}
- if (gtk_widget_intersect (page->tab_label, area, &child_area))
+ if (page->tab_label &&
+ gtk_widget_intersect (page->tab_label, area, &child_area))
gtk_widget_draw (page->tab_label, &child_area);
}
}
@@ -2421,7 +2423,7 @@
while (children)
{
page = children->data;
- if (GTK_WIDGET_MAPPED (page->tab_label))
+ if (page->tab_label && GTK_WIDGET_MAPPED (page->tab_label))
{
x = page->allocation.x;
y = page->allocation.y;
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS dpu s-:+ a C++$ ULS++$ P+++$>++++ L++>+++$ E+>++ W N++ !o K w++$ O !M-
!V(-) PS+ PE- Y+ PGP !t-- 5++ X R tv b+ DI+++ D G e++ h--- r+++ y++++
------END GEEK CODE BLOCK------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]