GtkWindow: Don't double free export user data

The user data passed when exporting a Wayland window was supposed to be
freed using the destroy_func, as is commonly done. This was previously
broken, as the user data was just NULL:ed when exported, and only
actually destroyed when unexporting before having exported.

While e016d9a5db fixed this, it introduced
a regression, as GtkWindow was nice enough to free the memory anyway
after having received the exported handle, causing it now to double
free.

https://bugzilla.gnome.org/show_bug.cgi?id=782109
This commit is contained in:
Jonas Ådahl 2017-05-09 23:07:02 +08:00
parent 28d8fdca02
commit 477556aac2

View File

@ -11261,8 +11261,6 @@ wayland_window_handle_exported (GdkWindow *window,
handle_str = g_strdup_printf ("wayland:%s", wayland_handle_str);
data->callback (data->window, handle_str, data->user_data);
g_free (handle_str);
g_free (data);
}
#endif