After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 135100 - Glade::Xml::get_widget_derived doesn't check return value
Glade::Xml::get_widget_derived doesn't check return value
Status: RESOLVED FIXED
Product: libglademm
Classification: Other
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2004-02-22 04:32 UTC by jdhall
Modified: 2011-01-16 23:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Check the return value of get_cwidget() (713 bytes, patch)
2004-02-22 04:35 UTC, jdhall
none Details | Review

Description jdhall 2004-02-22 04:32:59 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.
Comment 1 jdhall 2004-02-22 04:35:06 UTC
Created attachment 24645 [details] [review]
Check the return value of get_cwidget()
Comment 2 Murray Cumming 2004-03-28 13:01:00 UTC
Applied, in both branches. Thanks.

Please patch the Changelog and use cvs in future:
http://www.gtkmm.org/bugs.shtml