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.
This commit is contained in:
committed by
Kristian Høgsberg
parent
b7fd89192f
commit
8fbe3a68d4
@@ -265,6 +265,8 @@ destroy_surface(struct wl_resource *resource)
|
|||||||
{
|
{
|
||||||
struct nested_surface *surface = wl_resource_get_user_data(resource);
|
struct nested_surface *surface = wl_resource_get_user_data(resource);
|
||||||
|
|
||||||
|
wl_list_remove(&surface->link);
|
||||||
|
|
||||||
free(surface);
|
free(surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user