[gtk] Fix the Emoji chooser finalize
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] Fix the Emoji chooser finalize
- Date: Wed, 12 Feb 2020 19:24:56 +0000 (UTC)
commit 11ab39617e0b247dd6a7001980fe29950c518859
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Feb 12 14:23:01 2020 -0500
Fix the Emoji chooser finalize
If the Emoji chooser is finalized before the idle
has run, it would spew criticals, breaking some tests.
Avoid that.
gtk/gtkemojichooser.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkemojichooser.c b/gtk/gtkemojichooser.c
index 00a9edc262..36d3e35cfc 100644
--- a/gtk/gtkemojichooser.c
+++ b/gtk/gtkemojichooser.c
@@ -110,8 +110,8 @@ gtk_emoji_chooser_finalize (GObject *object)
if (chooser->populate_idle)
g_source_remove (chooser->populate_idle);
- g_variant_unref (chooser->data);
- g_object_unref (chooser->settings);
+ g_clear_pointer (&chooser->data, g_variant_unref);
+ g_clear_object (&chooser->settings);
G_OBJECT_CLASS (gtk_emoji_chooser_parent_class)->finalize (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]