GNOME Bugzilla – Bug 135100
Glade::Xml::get_widget_derived doesn't check return value
Last modified: 2011-01-16 23:33:29 UTC
Gnome::Glade::Xml::get_widget() doesn't check whether get_cwidget() succeeded, and ends up creating the derived widget with a null pointer. Since derived widgets have to pass the C object to the parent Gtkmm widget in their initializer list, they don't get a chance to check the pointer and handle the error. The return value should be checked, and get_widget_derived() should return NULL if get_cwidget() failed. Patch (which is trivial) to follow shortly.
Created attachment 24645 [details] [review] Check the return value of get_cwidget()
Applied, in both branches. Thanks. Please patch the Changelog and use cvs in future: http://www.gtkmm.org/bugs.shtml