action exporter: cancel pending events on unexport
authorRyan Lortie <desrt@desrt.ca>
Wed, 7 Dec 2011 19:43:50 +0000 (14:43 -0500)
committerRyan Lortie <desrt@desrt.ca>
Thu, 8 Dec 2011 23:05:15 +0000 (18:05 -0500)
If there are events pending when we unexport the action group, free them
and cancel the pending idle.

gio/gactiongroupexporter.c

index 9c78487..443a000 100644 (file)
@@ -553,6 +553,11 @@ g_action_group_exporter_free (gpointer user_data)
 
   for (i = 0; i < G_N_ELEMENTS (exporter->signal_ids); i++)
     g_signal_handler_disconnect (exporter->action_group, exporter->signal_ids[i]);
+
+  g_hash_table_unref (exporter->pending_changes);
+  if (exporter->pending_id)
+    g_source_remove (exporter->pending_id);
+
   g_object_unref (exporter->connection);
   g_object_unref (exporter->action_group);
   g_free (exporter->object_path);