Vulkan/Instance: Fix possible crash when not using layers or extensions
Former-commit-id: a429d0f1032f1a39ee50075b366d83cf4cba0823
This commit is contained in:
parent
72e849fa85
commit
3bcde868ef
|
|
@ -39,9 +39,9 @@ namespace Nz
|
|||
0,
|
||||
&appInfo,
|
||||
static_cast<UInt32>(layers.size()),
|
||||
&layers[0],
|
||||
(!layers.empty()) ? layers.data() : nullptr,
|
||||
static_cast<UInt32>(extensions.size()),
|
||||
&extensions[0]
|
||||
(!extensions.empty()) ? extensions.data() : nullptr
|
||||
};
|
||||
|
||||
return Create(instanceInfo, allocator);
|
||||
|
|
@ -69,12 +69,12 @@ namespace Nz
|
|||
|
||||
inline bool Instance::IsExtensionLoaded(const String& extensionName)
|
||||
{
|
||||
return m_loadedExtensions.count(extensionName) != 0;
|
||||
return m_loadedExtensions.count(extensionName) > 0;
|
||||
}
|
||||
|
||||
inline bool Instance::IsLayerLoaded(const String& layerName)
|
||||
{
|
||||
return m_loadedLayers.count(layerName) != 0;
|
||||
return m_loadedLayers.count(layerName) > 0;
|
||||
}
|
||||
|
||||
inline Instance::operator VkInstance()
|
||||
|
|
|
|||
Loading…
Reference in New Issue