[gnome-settings-daemon] wacom: don't unref null objects
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] wacom: don't unref null objects
- Date: Tue, 23 Nov 2010 03:18:08 +0000 (UTC)
commit 6d486385c245c758186c9ecc786635e3a76ab49b
Author: William Jon McCann <jmccann redhat com>
Date: Mon Nov 22 22:16:17 2010 -0500
wacom: don't unref null objects
Fixes a crash.
plugins/wacom/gsd-wacom-manager.c | 30 ++++++++++++++++++++----------
1 files changed, 20 insertions(+), 10 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-manager.c b/plugins/wacom/gsd-wacom-manager.c
index be2d8f3..9314ef1 100644
--- a/plugins/wacom/gsd-wacom-manager.c
+++ b/plugins/wacom/gsd-wacom-manager.c
@@ -608,20 +608,30 @@ gsd_wacom_manager_stop (GsdWacomManager *manager)
p->device_manager = NULL;
}
- g_object_unref (p->wacom_settings);
- p->wacom_settings = NULL;
+ if (p->wacom_settings != NULL) {
+ g_object_unref (p->wacom_settings);
+ p->wacom_settings = NULL;
+ }
- g_object_unref (p->stylus_settings);
- p->stylus_settings = NULL;
+ if (p->stylus_settings != NULL) {
+ g_object_unref (p->stylus_settings);
+ p->stylus_settings = NULL;
+ }
- g_object_unref (p->eraser_settings);
- p->eraser_settings = NULL;
+ if (p->eraser_settings != NULL) {
+ g_object_unref (p->eraser_settings);
+ p->eraser_settings = NULL;
+ }
- g_object_unref (p->cursor_settings);
- p->cursor_settings = NULL;
+ if (p->cursor_settings != NULL) {
+ g_object_unref (p->cursor_settings);
+ p->cursor_settings = NULL;
+ }
- g_object_unref (p->pad_settings);
- p->pad_settings = NULL;
+ if (p->pad_settings != NULL) {
+ g_object_unref (p->pad_settings);
+ p->pad_settings = NULL;
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]