mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
wayland-surface: Don't crash when someone tries to run a native app using old gtk
This ends up calling set_dbus_properties with a NULL window, instead of segfaulting the compositor return so that the broken app dies instead. https://bugzilla.gnome.org/show_bug.cgi?id=724472
This commit is contained in:
parent
d043d9943b
commit
d9659d4b36
@ -1113,6 +1113,13 @@ set_dbus_properties (struct wl_client *client,
|
||||
MetaWaylandSurfaceExtension *gtk_surface = wl_resource_get_user_data (resource);
|
||||
MetaWaylandSurface *surface = wl_container_of (gtk_surface, surface, gtk_surface);
|
||||
|
||||
/* Broken client, let it die instead of us */
|
||||
if (!surface->window)
|
||||
{
|
||||
meta_warning ("meta-wayland-surface: set_dbus_properties called with invalid window!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
meta_window_set_gtk_dbus_properties (surface->window,
|
||||
application_id,
|
||||
unique_bus_name,
|
||||
|
Loading…
Reference in New Issue
Block a user