diff options
| -rw-r--r-- | src/layer.cc | 4 | ||||
| -rw-r--r-- | src/layer_context.hh | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/layer.cc b/src/layer.cc index d3112d8..bc1ab5f 100644 --- a/src/layer.cc +++ b/src/layer.cc @@ -1002,6 +1002,10 @@ LowLatency_GetDeviceProcAddr(VkDevice device, const char* const pName) { VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL LowLatency_GetInstanceProcAddr(VkInstance instance, const char* const pName) { + if (!pName) { + return nullptr; + } + if (const auto it = instance_functions.find(pName); it != std::end(instance_functions)) { diff --git a/src/layer_context.hh b/src/layer_context.hh index 049684d..5c16926 100644 --- a/src/layer_context.hh +++ b/src/layer_context.hh @@ -82,7 +82,7 @@ class LayerContext final : public Context { std::shared_ptr<dispatch_context_t<DT>> get_context(const DT& dt) { const auto key = get_key(dt); - const auto lock = std::scoped_lock(this->mutex); + const auto lock = std::scoped_lock{this->mutex}; const auto it = this->contexts.find(key); assert(it != std::end(this->contexts)); |
