[at-spi2-core: 2/3] cleanup: Avoid disposing NULL



commit a275488033e218d6f8b5a08de3f337543238809a
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date:   Sun Aug 25 16:46:02 2019 +0200

    cleanup: Avoid disposing NULL
    
    In case atspi_application_dispose was previously called for an
    application, the app field of its root will be NULL.  In such a case
    cleanup should not try to dispose it.

 atspi/atspi-misc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/atspi/atspi-misc.c b/atspi/atspi-misc.c
index fddf601..ab6d7ed 100644
--- a/atspi/atspi-misc.c
+++ b/atspi/atspi-misc.c
@@ -159,7 +159,8 @@ cleanup ()
   for (i = desktop->children->len - 1; i >= 0; i--)
   {
     AtspiAccessible *child = g_ptr_array_index (desktop->children, i);
-    g_object_run_dispose (G_OBJECT (child->parent.app));
+    if (child->parent.app)
+      g_object_run_dispose (G_OBJECT (child->parent.app));
     g_object_run_dispose (G_OBJECT (child));
   }
 


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