[evince/wip/chpe/fix-critial] libview: Fix critial warnings when destroying EvPageAccessible
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/wip/chpe/fix-critial] libview: Fix critial warnings when destroying EvPageAccessible
- Date: Wed, 17 Nov 2021 00:00:35 +0000 (UTC)
commit 19bd33a75c404c8272842b37fea40bf5fb5dd999
Author: Christian Persch <chpe src gnome org>
Date: Tue Nov 16 23:54:17 2021 +0100
libview: Fix critial warnings when destroying EvPageAccessible
Only clear priv->links when it's not NULL. This fixes lots of warnings
when closing the previewer window on a document with links:
GLib-CRITICAL **: 23:46:34.810: g_hash_table_remove_all: assertion 'hash_table != NULL' failed
GLib-CRITICAL **: 23:46:34.810: g_hash_table_destroy: assertion 'hash_table != NULL' failed
libview/ev-page-accessible.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/libview/ev-page-accessible.c b/libview/ev-page-accessible.c
index ece1ff6ec..ed246d4b1 100644
--- a/libview/ev-page-accessible.c
+++ b/libview/ev-page-accessible.c
@@ -170,9 +170,7 @@ ev_page_accessible_finalize (GObject *object)
{
EvPageAccessiblePrivate *priv = EV_PAGE_ACCESSIBLE (object)->priv;
- g_hash_table_remove_all (priv->links);
- g_hash_table_destroy (priv->links);
- priv->links = NULL;
+ g_clear_pointer (&priv->links, g_hash_table_destroy);
clear_children (EV_PAGE_ACCESSIBLE (object));
G_OBJECT_CLASS (ev_page_accessible_parent_class)->finalize (object);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]