[gnome-settings-daemon] mouse: Simplify stop() call



commit 9e4e46a47fd385807f9cbae9d42ebcc312680a1e
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jan 15 14:57:50 2013 +0100

    mouse: Simplify stop() call

 plugins/mouse/gsd-mouse-manager.c |   17 +++--------------
 1 files changed, 3 insertions(+), 14 deletions(-)
---
diff --git a/plugins/mouse/gsd-mouse-manager.c b/plugins/mouse/gsd-mouse-manager.c
index ff99d4e..a62800a 100644
--- a/plugins/mouse/gsd-mouse-manager.c
+++ b/plugins/mouse/gsd-mouse-manager.c
@@ -1299,20 +1299,9 @@ gsd_mouse_manager_stop (GsdMouseManager *manager)
                 p->device_manager = NULL;
         }
 
-        if (p->mouse_a11y_settings != NULL) {
-                g_object_unref (p->mouse_a11y_settings);
-                p->mouse_a11y_settings = NULL;
-        }
-
-        if (p->mouse_settings != NULL) {
-                g_object_unref (p->mouse_settings);
-                p->mouse_settings = NULL;
-        }
-
-        if (p->touchpad_settings != NULL) {
-                g_object_unref (p->touchpad_settings);
-                p->touchpad_settings = NULL;
-        }
+        g_clear_object (&p->mouse_a11y_settings);
+        g_clear_object (&p->mouse_settings);
+        g_clear_object (&p->touchpad_settings);
 
         set_locate_pointer (manager, FALSE);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]