emoji chooser: Avoid a crash
authorMatthias Clasen <mclasen@redhat.com>
Fri, 1 Sep 2017 23:51:17 +0000 (19:51 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 1 Sep 2017 23:53:11 +0000 (19:53 -0400)
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

gtk/gtkentry.c

index 3b11290909aa383f8e6cdb6a99dbc25b2a572a82..6c5a6148196ed4371acb83b09cb684189e73c8fb 100644 (file)
@@ -11048,7 +11048,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)