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.
This commit is contained in:
Matthias Clasen 2020-02-12 14:23:01 -05:00
parent 7404c393f3
commit 11ab39617e

View File

@ -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);
}