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 625104 - Don't try and use the child of a GtkSeparatorMenuItem
Don't try and use the child of a GtkSeparatorMenuItem
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkComboBox
2.90.x
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-07-23 09:29 UTC by Philip Withnall
Modified: 2010-08-08 04:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't try and use the child of a GtkSeparatorMenuItem (5.00 KB, patch)
2010-07-23 09:29 UTC, Philip Withnall
none Details | Review
Do not use the child if Its not a GtkCellLayout (3.51 KB, patch)
2010-07-23 10:03 UTC, Javier Jardón (IRC: jjardon)
committed Details | Review

Description Philip Withnall 2010-07-23 09:29:15 UTC
Created attachment 166432 [details] [review]
Don't try and use the child of a GtkSeparatorMenuItem

Patch attached to prevent crashes when using a GtkComboBox with a popup menu.
Comment 1 Javier Jardón (IRC: jjardon) 2010-07-23 10:03:28 UTC
Created attachment 166437 [details] [review]
Do not use the child if Its not a GtkCellLayout

More complete patch that fix this an other similar issues
Comment 2 Christian Dywan 2010-07-23 10:18:59 UTC
What are the similar issues? The second patch looks very similar to the first one, with some differences in intendation.
Comment 3 Philip Withnall 2010-07-23 11:01:26 UTC
(In reply to comment #2)
> What are the similar issues? The second patch looks very similar to the first
> one, with some differences in intendation.

Javier's patch would be better in the case that there are other GtkMenuItem subclasses which don't have any children but do have a submenu, since in that case mine fails to recurse to the submenu.
Comment 4 Javier Jardón (IRC: jjardon) 2010-07-23 11:25:54 UTC
Sorry, seems that I didnt see the complete patch. the second patch resolves the same isues.

I simply use the same aproach that exist before the commit that introduce the bug ( commit 4427760bcc330f60ec5778be04274f9f8073a84d )
Comment 5 Matthias Clasen 2010-08-05 00:34:38 UTC
Comment on attachment 166437 [details] [review]
Do not use the child if Its not a GtkCellLayout

Looks good, please commit. To 2.22 as well, if it applies there.
Comment 6 Javier Jardón (IRC: jjardon) 2010-08-08 04:19:02 UTC
Comment on attachment 166437 [details] [review]
Do not use the child if Its not a GtkCellLayout

comitted in master (this bug doesnt affect gtk-2-22 branch) in commit dec067f25a4d451e147db2161fdd6d41b824a863
Comment 7 Javier Jardón (IRC: jjardon) 2010-08-08 04:19:16 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.