emoji chooser: Avoid a crash

The emoji chooser gets disposed already, because it is attached
to the toplevel as a popover. Doing it again when the object data
is cleared is leading to a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=787103
This commit is contained in:
Matthias Clasen
2017-09-01 19:51:17 -04:00
parent 7e1f3344f7
commit f414e1b15f

View File

@@ -9851,7 +9851,7 @@ gtk_entry_choose_emoji (GtkEntry *entry)
if (!chooser)
{
chooser = gtk_emoji_chooser_new ();
g_object_set_data_full (G_OBJECT (entry), "gtk-emoji-chooser", chooser, (GDestroyNotify)gtk_widget_destroy);
g_object_set_data (G_OBJECT (entry), "gtk-emoji-chooser", chooser);
gtk_popover_set_relative_to (GTK_POPOVER (chooser), GTK_WIDGET (entry));
if (entry->priv->show_emoji_icon)