mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Merge pull request #95074 from RandomShaper/d3d12_exit_crash
D3D12: Avoid crash on exit
This commit is contained in:
commit
32eb97fd2a
1 changed files with 5 additions and 0 deletions
|
@ -85,6 +85,11 @@ const GUID CLSID_D3D12SDKConfigurationGodot = { 0x7cda6aca, 0xa03e, 0x49c8, { 0x
|
||||||
RenderingContextDriverD3D12::RenderingContextDriverD3D12() {}
|
RenderingContextDriverD3D12::RenderingContextDriverD3D12() {}
|
||||||
|
|
||||||
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) {
|
if (lib_d3d12) {
|
||||||
FreeLibrary(lib_d3d12);
|
FreeLibrary(lib_d3d12);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue