GNOME Bugzilla – Bug 753285
g_menu_item_set_icon fails if called with NULL icon
Last modified: 2015-08-10 17:07:08 UTC
Some apps, especially old or misconfigured ones don't have icons or at least GNOME doesn't know about them
Created attachment 308801 [details] [review] EogWindow: Avoid null menu item icons on open with.. menu
Can you give some more details about the error? Is it triggering error messages or does it break the menus? According to the API docs g_menu_item_set_icon() should be able to handle a NULL icon and as such the check in your patch shouldn't be needed.
(eog:28250): GLib-GIO-CRITICAL **: g_menu_item_set_icon: assertion 'G_IS_ICON (icon)' failed This should be avoided
Ah, that's actually a GIO bug then. The function logs a critical if the icon is NULL although it explicitly allows a NULL-icon.
Created attachment 308985 [details] [review] fix assertion to allow a NULL icon This fixes the assertion to respect a NULL icon.
Review of attachment 308985 [details] [review]: looks right
And pushed to master. --- This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.