diff --git a/include/Nazara/VulkanRenderer/Wrapper/Instance.inl b/include/Nazara/VulkanRenderer/Wrapper/Instance.inl index 309a01fb2..50feca010 100644 --- a/include/Nazara/VulkanRenderer/Wrapper/Instance.inl +++ b/include/Nazara/VulkanRenderer/Wrapper/Instance.inl @@ -19,7 +19,8 @@ namespace Nz inline Instance::~Instance() { - DestroyInstance(); + if (m_instance) + DestroyInstance(); } inline bool Instance::Create(const String& appName, UInt32 appVersion, const String& engineName, UInt32 engineVersion, const std::vector& layers, const std::vector& extensions, const VkAllocationCallbacks* allocator)