nested: Remove the surface from the surface list when destroyed

Otherwise if the surface is destroyed then it will crash when it later
tries to render all of the surfaces. You can replicate this by doing
killall weston-nested-client while the example is running.
dev
Neil Roberts 11 years ago committed by Kristian Høgsberg
parent b7fd89192f
commit 8fbe3a68d4
  1. 2
      clients/nested.c

@ -265,6 +265,8 @@ destroy_surface(struct wl_resource *resource)
{
struct nested_surface *surface = wl_resource_get_user_data(resource);
wl_list_remove(&surface->link);
free(surface);
}

Loading…
Cancel
Save