diff --git a/Source/Engine/Graphics/Graphics.cpp b/Source/Engine/Graphics/Graphics.cpp index 21b506ef1..69170dca0 100644 --- a/Source/Engine/Graphics/Graphics.cpp +++ b/Source/Engine/Graphics/Graphics.cpp @@ -49,6 +49,9 @@ GraphicsService GraphicsServiceInstance; void Graphics::DisposeDevice() { + // Clean any danging pointer to last task (might stay if engine is disposing after crash) + GPUDevice::Instance->CurrentTask = nullptr; + if (GPUDevice::Instance) { GPUDevice::Instance->Dispose();