Skip to content

Commit

Permalink
Merge pull request godotengine#95074 from RandomShaper/d3d12_exit_crash
Browse files Browse the repository at this point in the history
D3D12: Avoid crash on exit
  • Loading branch information
akien-mga committed Aug 8, 2024
2 parents 9221294 + 33bd994 commit 32eb97f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/d3d12/rendering_context_driver_d3d12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 32eb97f

Please sign in to comment.