GNOME Bugzilla – Bug 697750
media-keys plugins warns/crashes when shell restarts
Last modified: 2013-04-14 02:59:38 UTC
Run gnome-settings-daemon on a command line, restart the shell with "Alt-F2 r", observe warnings. This is the continuation of https://bugzilla.gnome.org/show_bug.cgi?id=697698
Created attachment 241199 [details] [review] Fix warnins/crashes when shell restarts
Review of attachment 241199 [details] [review]: Not your fault but I don't like this use of cancellables in the first place. This code should just create an instance in _start() and always use it since it then only cancels it in _stop() anyway. As for this particular patch, there's no need for all the g_clear_object()s. It goes against the intent of the original which sets a g_object_add_weak_pointer() on the cancellable. So, either just keep the last hunk of this patch or remove the whole ensure_cancellable() dance altogether.
Created attachment 241427 [details] [review] Fix warnins/crashes when shell restarts v2 Reworked following your inputs.
Review of attachment 241427 [details] [review]: With that extra cleanup looks fine. ::: plugins/media-keys/gsd-media-keys-manager.c @@ -377,3 @@ { - GsdMediaKeysManager *manager = data; - g_object_unref (manager->priv->osd_cancellable); This whole method can go away.
Review of attachment 241427 [details] [review]: Committed to master and gnome-3-8.