`d3d12_destroy_screen` is called by `d3d12_create_dxcore_screen` after
`d3d12_init_screen_base` fails and attempts to call `util_dl_close` on
a NULL pointer, leading to an abort.
To fix this, only close the library after if it was actually opened.
Cc: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20145>
(cherry picked from commit
b3d1ae19f2f4d93cf0a5f45a598149ac4e8e05aa)
"description": "d3d12: Don't crash when libd3d12.so can't be found",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
slab_destroy_parent(&screen->transfer_pool);
mtx_destroy(&screen->submit_mutex);
mtx_destroy(&screen->descriptor_pool_mutex);
- util_dl_close(screen->d3d12_mod);
+ if (screen->d3d12_mod)
+ util_dl_close(screen->d3d12_mod);
glsl_type_singleton_decref();
FREE(screen);
}