aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-gtk/menuitem.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-07-08 10:21:20 -0500
committerTed Gould <ted@gould.cx>2010-07-08 10:21:20 -0500
commit493c2563ce462abc3b1c6c6d3d637a03b801534e (patch)
treea2d8c6bc457d74e7eb28967dc635c7565df4ba04 /libdbusmenu-gtk/menuitem.c
parent62cb7aa30100b477359c7ddbe2318deed1bb9b1a (diff)
parent0828cb88a4db832ddfcf0350305bebf116c1a240 (diff)
downloadlibdbusmenu-493c2563ce462abc3b1c6c6d3d637a03b801534e.tar.gz
libdbusmenu-493c2563ce462abc3b1c6c6d3d637a03b801534e.tar.bz2
libdbusmenu-493c2563ce462abc3b1c6c6d3d637a03b801534e.zip
New upstream release.
∘ Protect against NULL nodes (LP: #602444) ∘ Remove extra warnings and messages ∘ Handle not having a session bus better (LP: #598715)
Diffstat (limited to 'libdbusmenu-gtk/menuitem.c')
-rw-r--r--libdbusmenu-gtk/menuitem.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libdbusmenu-gtk/menuitem.c b/libdbusmenu-gtk/menuitem.c
index 9924546..5846aa7 100644
--- a/libdbusmenu-gtk/menuitem.c
+++ b/libdbusmenu-gtk/menuitem.c
@@ -264,9 +264,10 @@ dbusmenu_menuitem_property_set_shortcut_menuitem (DbusmenuMenuitem * menuitem, c
GtkAccelGroup * group = gtk_accel_group_from_accel_closure(closure);
- /* Seriously, if this returns NULL something is seriously
- wrong in GTK. */
- g_return_val_if_fail(group != NULL, FALSE);
+ /* Apparently this is more common than I thought. */
+ if (group == NULL) {
+ return FALSE;
+ }
GtkAccelKey * key = gtk_accel_group_find(group, find_closure, closure);
/* Again, not much we can do except complain loudly. */