projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f3ec9d3
)
anv: Properly handle destroying NULL devices and instances
author
Jason Ekstrand
<jason.ekstrand@intel.com>
Wed, 1 Mar 2017 16:39:49 +0000
(08:39 -0800)
committer
Jason Ekstrand
<jason.ekstrand@intel.com>
Wed, 1 Mar 2017 23:31:44 +0000
(15:31 -0800)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: "17.0 13.0" <mesa-dev@lists.freedesktop.org>
src/intel/vulkan/anv_device.c
patch
|
blob
|
history
diff --git
a/src/intel/vulkan/anv_device.c
b/src/intel/vulkan/anv_device.c
index
0db96f2
..
238e149
100644
(file)
--- a/
src/intel/vulkan/anv_device.c
+++ b/
src/intel/vulkan/anv_device.c
@@
-360,6
+360,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);
@@
-1095,6
+1098,9
@@
void anv_DestroyDevice(
{
ANV_FROM_HANDLE(anv_device, device, _device);
+ if (!device)
+ return;
+
anv_device_finish_blorp(device);
anv_queue_finish(&device->queue);