mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
aco/tests: don't destroy vk_device if it was never created
Happens if you only run one test that doesn't need a vk_device. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39268>
This commit is contained in:
parent
fad95030a7
commit
daf235c607
1 changed files with 4 additions and 2 deletions
|
|
@ -751,8 +751,10 @@ get_vk_device(enum radeon_family family)
|
|||
static struct DestroyDevices {
|
||||
~DestroyDevices()
|
||||
{
|
||||
DestroyDevice(vk_device, NULL);
|
||||
DestroyInstance(vk_instance, NULL);
|
||||
if (vk_device)
|
||||
DestroyDevice(vk_device, NULL);
|
||||
if (vk_instance)
|
||||
DestroyInstance(vk_instance, NULL);
|
||||
}
|
||||
} destroy_devices;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue