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 733782 - GtkListBoxRowAccessible expects the parent to be a GtkListBox
GtkListBoxRowAccessible expects the parent to be a GtkListBox
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.13.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-07-26 12:20 UTC by Timm Bäder
Modified: 2014-08-03 00:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Just add a GTK_IS_LIST_BOX check before using the parent (1.03 KB, patch)
2014-07-26 12:20 UTC, Timm Bäder
committed Details | Review

Description Timm Bäder 2014-07-26 12:20:58 UTC
Created attachment 281765 [details] [review]
Just add a GTK_IS_LIST_BOX check before using the parent

... which makes a cast to GtkListBoxRow fail.

The attached patch fixes that by just also checking if the parent is a GtkListBox.
Comment 1 Matthias Clasen 2014-07-28 22:10:32 UTC
Review of attachment 281765 [details] [review]:

Add list box rows to something other than a list box _should_ really fail. What are you adding your list box rows to ?
Comment 2 Timm Bäder 2014-07-29 06:47:30 UTC
I'm adding it to a GtkBox. There was a similar case in the past where adding a GtkListBoxRow to something other than a GtListBox caused a crash and glade needed that to be fixed (because you need to edit rows and composite templates etc). I didn't see the assertion fail the last time I tried it in glade though, so that might be uninteresting. My case is most probably better solved using another widget.
Comment 3 Matthias Clasen 2014-07-29 07:56:24 UTC
ah, I guess glade is a valid case. So, it is probably a good idea to avoid crashing in this case.
Comment 4 Matthias Clasen 2014-07-29 07:56:55 UTC
Review of attachment 281765 [details] [review]:

ok