[at-spi2-core: 1/2] misc: call queue cleanup function
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core: 1/2] misc: call queue cleanup function
- Date: Mon, 22 Aug 2022 19:54:58 +0000 (UTC)
commit 522c712aa8ae7f3c2ac576ef9b9ec130d31048ae
Author: Victor Toso <victortoso gnome org>
Date: Sun Aug 21 14:18:53 2022 +0200
misc: call queue cleanup function
This function was introduced in !53 with 7fdbb0f9 but was not called.
I've updated the function to avoid possible complains if the pointer
is NULL.
Fixes warning:
../atspi/atspi-misc.c:785:1: warning: ‘cleanup_deferred_message’ defined but not used
[-Wunused-function]
785 | cleanup_deferred_message(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~
atspi/atspi-misc.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/atspi/atspi-misc.c b/atspi/atspi-misc.c
index 18abfceb..cc7e54dd 100644
--- a/atspi/atspi-misc.c
+++ b/atspi/atspi-misc.c
@@ -170,6 +170,8 @@ end:
dbus_connection_unref (bus);
bus = NULL;
}
+
+ cleanup_deferred_message ();
}
static gboolean atspi_inited = FALSE;
@@ -784,8 +786,11 @@ destroy_deferred_message_item(gpointer ptr)
static void
cleanup_deferred_message(void)
{
- g_queue_free_full (deferred_messages, destroy_deferred_message_item);
- deferred_messages = NULL;
+ if (deferred_messages)
+ {
+ g_queue_free_full (deferred_messages, destroy_deferred_message_item);
+ deferred_messages = NULL;
+ }
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]