diff options
author | Bastien Nocera <hadess@hadess.net> | 2014-09-25 12:12:47 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2014-09-25 12:13:19 +0200 |
commit | 2560fbfb02be0c4748285dcf9d5375dbe527ab85 (patch) | |
tree | 2f2d2e4d4592883cafa58fb4a42687d30325f783 | |
parent | 37f8b6593080230497332798693cda17a42737fa (diff) | |
download | gnome-settings-daemon-2560fbfb02be0c4748285dcf9d5375dbe527ab85.tar.gz |
remote-display: Stop plugin when exiting
Make sure that the plugin is stopped when it's disposed of.
https://bugzilla.redhat.com/show_bug.cgi?id=1145144
-rw-r--r-- | plugins/remote-display/gsd-remote-display-manager.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/remote-display/gsd-remote-display-manager.c b/plugins/remote-display/gsd-remote-display-manager.c index ab49ee5b..616fb1a2 100644 --- a/plugins/remote-display/gsd-remote-display-manager.c +++ b/plugins/remote-display/gsd-remote-display-manager.c @@ -263,8 +263,29 @@ gsd_remote_display_manager_stop (GsdRemoteDisplayManager *manager) } static void +gsd_remote_display_manager_finalize (GObject *object) +{ + GsdRemoteDisplayManager *manager; + + g_return_if_fail (object != NULL); + g_return_if_fail (GSD_IS_REMOTE_DISPLAY_MANAGER (object)); + + manager = GSD_REMOTE_DISPLAY_MANAGER (object); + + g_return_if_fail (manager->priv != NULL); + + gsd_remote_display_manager_stop (manager); + + G_OBJECT_CLASS (gsd_remote_display_manager_parent_class)->finalize (object); +} + +static void gsd_remote_display_manager_class_init (GsdRemoteDisplayManagerClass *klass) { + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + object_class->finalize = gsd_remote_display_manager_finalize; + g_type_class_add_private (klass, sizeof (GsdRemoteDisplayManagerPrivate)); } |