diff --git a/Source/Engine/GraphicsDevice/DirectX/DX11/GPUDeviceDX11.cpp b/Source/Engine/GraphicsDevice/DirectX/DX11/GPUDeviceDX11.cpp index ede8ad404..79bb57d16 100644 --- a/Source/Engine/GraphicsDevice/DirectX/DX11/GPUDeviceDX11.cpp +++ b/Source/Engine/GraphicsDevice/DirectX/DX11/GPUDeviceDX11.cpp @@ -145,6 +145,11 @@ GPUDevice* GPUDeviceDX11::Create() } // Select the adapter to use + if (adapters.Count() == 0) + { + LOG(Error, "Failed to find valid DirectX adapter!"); + return nullptr; + } GPUAdapterDX selectedAdapter = adapters[0]; uint32 vendorId = 0; if (CommandLine::Options.NVIDIA) diff --git a/Source/Engine/GraphicsDevice/DirectX/DX12/GPUDeviceDX12.cpp b/Source/Engine/GraphicsDevice/DirectX/DX12/GPUDeviceDX12.cpp index f12efeafc..d46f7adf9 100644 --- a/Source/Engine/GraphicsDevice/DirectX/DX12/GPUDeviceDX12.cpp +++ b/Source/Engine/GraphicsDevice/DirectX/DX12/GPUDeviceDX12.cpp @@ -119,6 +119,11 @@ GPUDevice* GPUDeviceDX12::Create() } // Select the adapter to use + if (adapters.Count() == 0) + { + LOG(Error, "Failed to find valid DirectX adapter!"); + return nullptr; + } GPUAdapterDX selectedAdapter = adapters[0]; uint32 vendorId = 0; if (CommandLine::Options.NVIDIA) diff --git a/Source/Engine/GraphicsDevice/Vulkan/GPUDeviceVulkan.cpp b/Source/Engine/GraphicsDevice/Vulkan/GPUDeviceVulkan.cpp index aa7cd53ee..85e151ee0 100644 --- a/Source/Engine/GraphicsDevice/Vulkan/GPUDeviceVulkan.cpp +++ b/Source/Engine/GraphicsDevice/Vulkan/GPUDeviceVulkan.cpp @@ -1202,6 +1202,11 @@ GPUDevice* GPUDeviceVulkan::Create() } // Select the adapter to use + if (adapters.Count() == 0) + { + LOG(Error, "Failed to find valid Vulkan adapter!"); + return nullptr; + } int32 selectedAdapter = 0; uint32 vendorId = 0; if (CommandLine::Options.NVIDIA)