GNOME Bugzilla – Bug 101135
gtk_viewport_realize() crash if hadjustment is NULL
Last modified: 2011-02-04 16:11:59 UTC
If gtk_viewport_realize() is called before the hadjustment has been created, it will segfault. Calling gtk_viewport_set_hadjustment(viewport, NULL) right after creating it fixes the problem, but it looks like this should happen automatically...
Can you provide a test case? I'm marking priority as Low, since: - I don't think anything has changed in a long time here - Using a viewport not in a scrolled window is unusual - Realize before size allocate is unusual and generally discouraged.
*** Bug 113230 has been marked as a duplicate of this bug. ***
Fri Jun 6 16:25:44 2003 Owen Taylor <otaylor@redhat.com> * gtk/gtkviewport.c: Many fixes, along with extensive cleanups and refactoring of code to reduce duplication; fixes include: [...] - gtk_viewport_class_init: Make the hadjustment/vadjustment properties G_PARAM_CONSTRUCT, so that there will always be adjustments, even if gtk_viewport_new isn't used (#101135, Thomas Leonard). - Switch over to encapsulated lazy-creation for hadjustment/ vadjustment; even with the CONSTRUCT property, we need this after destroy.