mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 18:40:13 +01:00
pvr: Only destroy the physcial device if it exists
Without this, it segfaults on instance destruction which brings down the Vulkan app if you have the driver installed on your system, even if you have no PowerVR hardware. Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18330>
This commit is contained in:
parent
6fed616187
commit
201e1ba9db
1 changed files with 2 additions and 1 deletions
|
|
@ -240,7 +240,8 @@ void pvr_DestroyInstance(VkInstance _instance,
|
|||
if (!instance)
|
||||
return;
|
||||
|
||||
pvr_physical_device_finish(&instance->physical_device);
|
||||
if (instance->physical_devices_count > 0)
|
||||
pvr_physical_device_finish(&instance->physical_device);
|
||||
|
||||
VG(VALGRIND_DESTROY_MEMPOOL(instance));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue