projects
/
platform
/
upstream
/
Vulkan-Loader.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7626527
)
fix: add null pointer checking
author
Danny Zhu
<danny@netflt.com>
Tue, 25 Oct 2022 14:30:29 +0000
(22:30 +0800)
committer
Charles Giessen
<46324611+charles-lunarg@users.noreply.github.com>
Tue, 25 Oct 2022 15:08:22 +0000
(09:08 -0600)
loader/loader.c
patch
|
blob
|
history
diff --git
a/loader/loader.c
b/loader/loader.c
index 84031dfb44e499163c56355c666143e3212dc577..00a0273da7c8183a5901d2621fd00984aafaae67 100644
(file)
--- a/
loader/loader.c
+++ b/
loader/loader.c
@@
-4307,9
+4307,12
@@
VKAPI_ATTR void VKAPI_CALL loader_layer_destroy_device(VkDevice device, const Vk
const struct loader_instance *inst = icd_term->this_instance;
destroyFunction(device, pAllocator);
- dev->chain_device = NULL;
- dev->icd_device = NULL;
- loader_remove_logical_device(inst, icd_term, dev, pAllocator);
+ if (NULL != dev)
+ {
+ dev->chain_device = NULL;
+ dev->icd_device = NULL;
+ loader_remove_logical_device(inst, icd_term, dev, pAllocator);
+ }
}
// Given the list of layers to activate in the loader_instance