shell: Fix set_transient_for with a NULL parent

dev
Jasper St. Pierre 11 years ago committed by Kristian Høgsberg
parent 8d344a0548
commit 8f180d44f5
  1. 8
      desktop-shell/shell.c

@ -1855,8 +1855,12 @@ xdg_surface_set_transient_for(struct wl_client *client,
struct wl_resource *parent_resource) struct wl_resource *parent_resource)
{ {
struct shell_surface *shsurf = wl_resource_get_user_data(resource); struct shell_surface *shsurf = wl_resource_get_user_data(resource);
struct weston_surface *parent = struct weston_surface *parent;
wl_resource_get_user_data(parent_resource);
if (parent_resource)
parent = wl_resource_get_user_data(parent_resource);
else
parent = NULL;
shell_surface_set_parent(shsurf, parent); shell_surface_set_parent(shsurf, parent);
} }

Loading…
Cancel
Save