diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2024-08-02 17:50:58 +0200 |
---|---|---|
committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2024-08-02 18:18:10 +0200 |
commit | 33bd9940873aa772eea8ac5c445e077571f57c3b (patch) | |
tree | f49fdbd1493f2ebfbdc3ea6a9ea77c5e906b837a /drivers/d3d12 | |
parent | 3978628c6cc1227250fc6ed45c8d854d24c30c30 (diff) | |
download | redot-engine-33bd9940873aa772eea8ac5c445e077571f57c3b.tar.gz |
D3D12: Avoid crash on exit
Diffstat (limited to 'drivers/d3d12')
-rw-r--r-- | drivers/d3d12/rendering_context_driver_d3d12.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/d3d12/rendering_context_driver_d3d12.cpp b/drivers/d3d12/rendering_context_driver_d3d12.cpp index d01ae5a73f..8fa495f5c4 100644 --- a/drivers/d3d12/rendering_context_driver_d3d12.cpp +++ b/drivers/d3d12/rendering_context_driver_d3d12.cpp @@ -85,6 +85,11 @@ const GUID CLSID_D3D12SDKConfigurationGodot = { 0x7cda6aca, 0xa03e, 0x49c8, { 0x RenderingContextDriverD3D12::RenderingContextDriverD3D12() {} RenderingContextDriverD3D12::~RenderingContextDriverD3D12() { + // Let's release manually everything that may still be holding + // onto the DLLs before freeing them. + device_factory.Reset(); + dxgi_factory.Reset(); + if (lib_d3d12) { FreeLibrary(lib_d3d12); } |