vc4: destroy renderonly object if present
When destroying the VC4 screen, check if renderonly exists before
freeing it.
This fixes for instance a segmentation fault caused when invoking
wflinfo.
Fixes: 187218395d
("renderonly: remove layering violations")
Reviewed-by: Andres Gomez <agomez@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9562>
This commit is contained in:
parent
ec4c79c2b0
commit
557c86d6ce
|
@ -105,7 +105,8 @@ vc4_screen_destroy(struct pipe_screen *pscreen)
|
|||
_mesa_hash_table_destroy(screen->bo_handles, NULL);
|
||||
vc4_bufmgr_destroy(pscreen);
|
||||
slab_destroy_parent(&screen->transfer_pool);
|
||||
screen->ro->destroy(screen->ro);
|
||||
if (screen->ro)
|
||||
screen->ro->destroy(screen->ro);
|
||||
|
||||
#ifdef USE_VC4_SIMULATOR
|
||||
vc4_simulator_destroy(screen);
|
||||
|
|
Loading…
Reference in New Issue