summaryrefslogtreecommitdiff
blob: a8f02a0eae1f14cfe70c14c4f39d6977d200c6ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From 72220192a31df6b297312d82f059e9824e8a4dc3 Mon Sep 17 00:00:00 2001
From: Christian Hergert <christian@hergert.me>
Date: Fri, 15 May 2015 13:07:18 -0700
Subject: [PATCH] atk-adapter: be careful with potential NULL GObjects

I've been seeing warnings in my Gtk application for a while due to this.
---
 atk-adaptor/accessible-stateset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/atk-adaptor/accessible-stateset.c b/atk-adaptor/accessible-stateset.c
index f82910b..82820de 100644
--- a/atk-adaptor/accessible-stateset.c
+++ b/atk-adaptor/accessible-stateset.c
@@ -185,7 +185,7 @@ spi_atk_state_to_dbus_array (AtkObject * object, dbus_uint32_t * array)
 {
   AtkStateSet *set = atk_object_ref_state_set (object);
   spi_atk_state_set_to_dbus_array (set, array);
-  g_object_unref (set);
+  g_clear_object (&set);
 }
 
 void
-- 
2.4.3