mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
gio: g_menu_item_set_icon should not fail if icon is NULL
It allows passing a NULL icon to unset the icon and thus should not log a critical warning if used like that. https://bugzilla.gnome.org/show_bug.cgi?id=753285
This commit is contained in:
parent
0993cf6dc0
commit
34277d6996
@ -1375,7 +1375,7 @@ g_menu_item_set_icon (GMenuItem *menu_item,
|
|||||||
GVariant *value;
|
GVariant *value;
|
||||||
|
|
||||||
g_return_if_fail (G_IS_MENU_ITEM (menu_item));
|
g_return_if_fail (G_IS_MENU_ITEM (menu_item));
|
||||||
g_return_if_fail (G_IS_ICON (icon));
|
g_return_if_fail (icon == NULL || G_IS_ICON (icon));
|
||||||
|
|
||||||
if (icon != NULL)
|
if (icon != NULL)
|
||||||
value = g_icon_serialize (icon);
|
value = g_icon_serialize (icon);
|
||||||
|
Loading…
Reference in New Issue
Block a user