projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0993cf6
)
gio: g_menu_item_set_icon should not fail if icon is NULL
author
Felix Riemann
<friemann@gnome.org>
Sun, 9 Aug 2015 21:13:38 +0000
(23:13 +0200)
committer
Felix Riemann
<friemann@gnome.org>
Mon, 10 Aug 2015 17:00:24 +0000
(19:00 +0200)
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
gio/gmenu.c
patch
|
blob
|
history
diff --git
a/gio/gmenu.c
b/gio/gmenu.c
index
fe82ba7
..
e90fb14
100644
(file)
--- a/
gio/gmenu.c
+++ b/
gio/gmenu.c
@@
-1375,7
+1375,7
@@
g_menu_item_set_icon (GMenuItem *menu_item,
GVariant *value;
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)
value = g_icon_serialize (icon);