mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
anv: Properly handle destroying NULL devices and instances
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: "17.0 13.0" <mesa-dev@lists.freedesktop.org>
(cherry picked from commit e3d33a23e6)
This commit is contained in:
parent
357f50f0e2
commit
010f672d10
1 changed files with 6 additions and 0 deletions
|
|
@ -325,6 +325,9 @@ void anv_DestroyInstance(
|
|||
{
|
||||
ANV_FROM_HANDLE(anv_instance, instance, _instance);
|
||||
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (instance->physicalDeviceCount > 0) {
|
||||
/* We support at most one physical device. */
|
||||
assert(instance->physicalDeviceCount == 1);
|
||||
|
|
@ -978,6 +981,9 @@ void anv_DestroyDevice(
|
|||
{
|
||||
ANV_FROM_HANDLE(anv_device, device, _device);
|
||||
|
||||
if (!device)
|
||||
return;
|
||||
|
||||
anv_device_finish_blorp(device);
|
||||
|
||||
anv_queue_finish(&device->queue);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue