[at-spi2-core] ref_accessible_desktop: don't unref reply until we're finished with it



commit 35d01cbec1f7f42d75ff90b9526c7c40435e0b46
Author: Mike Gorse <mgorse suse com>
Date:   Sun May 22 07:15:21 2016 -0500

    ref_accessible_desktop: don't unref reply until we're finished with it
    
    Oops!

 atspi/atspi-misc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/atspi/atspi-misc.c b/atspi/atspi-misc.c
index 83d3f96..1ec9be1 100644
--- a/atspi/atspi-misc.c
+++ b/atspi/atspi-misc.c
@@ -606,13 +606,14 @@ ref_accessible_desktop (AtspiApplication *app)
     get_reference_from_iter (&iter_array, &app_name, &path);
     add_app_to_desktop (desktop, app_name);
   }
-  dbus_message_unref (reply);
 
   /* Record the alternate name as an alias for org.a11y.atspi.Registry */
   bus_name_dup = g_strdup (dbus_message_get_sender (reply));
   if (bus_name_dup)
     g_hash_table_insert (app_hash, bus_name_dup, app);
 
+  dbus_message_unref (reply);
+
   return g_object_ref (desktop);
 }
 


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