summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2012-10-16 16:27:12 (GMT)
committerRyan Lortie <desrt@desrt.ca>2012-10-16 16:31:23 (GMT)
commit212ffcc574d929ca0715960b4f29a4aab909a251 (patch)
tree6e0fa83d1d9b9a6dc90d72162b97c318a0bebca0
parent2002479c02fa6e468fc3f67ddc663657a52ebde8 (diff)
downloadglib-212ffcc574d929ca0715960b4f29a4aab909a251.zip
glib-212ffcc574d929ca0715960b4f29a4aab909a251.tar.xz
GMenuExporter: allow NULL bus on _name_vanished
GBusNameVanishedCallback is called with a NULL GDBusConnection in the case that the connection has vanished. We were doing an assert to verify that it was the same as we had exported the menu on and that assert was failing. https://bugzilla.gnome.org/show_bug.cgi?id=685995
-rw-r--r--gio/gmenuexporter.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gio/gmenuexporter.c b/gio/gmenuexporter.c
index e57ad47..8509ffd 100644
--- a/gio/gmenuexporter.c
+++ b/gio/gmenuexporter.c
@@ -556,7 +556,8 @@ g_menu_exporter_name_vanished (GDBusConnection *connection,
{
GMenuExporter *exporter = user_data;
- g_assert (exporter->connection == connection);
+ /* connection == NULL when we get called because the connection closed */
+ g_assert (exporter->connection == connection || connection == NULL);
g_hash_table_remove (exporter->remotes, name);
}