When destroying the VC4 screen, check if renderonly exists before
freeing it.
This fixes for instance a segmentation fault caused when invoking
wflinfo.
Fixes:
187218395d7 ("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>
_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);