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 136259 - Reference to deleted object in GtkButton
Reference to deleted object in GtkButton
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
2.3.x
Other Solaris
: Normal critical
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2004-03-05 09:55 UTC by padraig.obriain
Modified: 2011-02-04 16:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (703 bytes, patch)
2004-03-05 09:56 UTC, padraig.obriain
none Details | Review
Alternative patch (683 bytes, patch)
2004-03-05 10:52 UTC, padraig.obriain
none Details | Review

Description padraig.obriain 2004-03-05 09:55:05 UTC
If gtk_button_new_from_stock() is called and subsequently
gtk_button_set_label() is called, the widget priv->image is destroyed but
priv->image retains its value.

See bug #135926 for the effect on gok.
Comment 1 padraig.obriain 2004-03-05 09:56:40 UTC
Created attachment 25193 [details] [review]
Proposed patch
Comment 2 Matthias Clasen 2004-03-05 10:09:16 UTC
Wouldn't it be simpler and more in line with what we do elsewhere to


insert a priv->image = NULL at a strategic place in construct_child ?
Comment 3 padraig.obriain 2004-03-05 10:52:55 UTC
Created attachment 25199 [details] [review]
Alternative patch
Comment 4 padraig.obriain 2004-03-05 10:54:14 UTC
The alternative patch works for me as well.
Comment 5 Matthias Clasen 2004-03-05 11:05:06 UTC
That one looks fine; I'll commit it tonight if you don't want to do 
that yourself.