wlserver: adjust assertion in wlserver_surface_set_wlr

Make sure we don't overwrite an existing surf->wlr. We don't really
care about the Wayland surface ID here.
This commit is contained in:
Simon Ser 2021-04-16 15:16:14 +02:00
parent ce0a3f7259
commit 10816e6ed8

View file

@ -674,7 +674,7 @@ static void handle_surface_destroy( struct wl_listener *l, void *data )
static void wlserver_surface_set_wlr( struct wlserver_surface *surf, struct wlr_surface *wlr_surf ) static void wlserver_surface_set_wlr( struct wlserver_surface *surf, struct wlr_surface *wlr_surf )
{ {
assert( surf->wl_id != 0 ); assert( surf->wlr == nullptr );
wl_list_remove( &surf->pending_link ); wl_list_remove( &surf->pending_link );
wl_list_init( &surf->pending_link ); wl_list_init( &surf->pending_link );