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 788163 - menu: handle NULL toplevel
menu: handle NULL toplevel
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkMenu
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 725146 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-09-26 05:10 UTC by Timm Bäder
Modified: 2018-01-26 11:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
menu: Guard against NULL toplevel (2.61 KB, patch)
2017-09-26 05:10 UTC, Timm Bäder
accepted-commit_now Details | Review

Description Timm Bäder 2017-09-26 05:10:54 UTC
Created attachment 360397 [details] [review]
menu: Guard against NULL toplevel

GtkMenu explicitly connects to ::destroyed of its toplevel window, but if the window ever actually gets destroyed (and priv->toplevel set to NULL), it will still later try to do NULL-unsafe things like trying to disconnect from some signals.

The attached patch is against 3.22 but I assume the same problem is present in master.
Comment 1 Daniel Boles 2017-10-09 11:34:53 UTC
*** Bug 725146 has been marked as a duplicate of this bug. ***
Comment 2 Matthias Clasen 2018-01-18 18:26:25 UTC
Review of attachment 360397 [details] [review]:

ok