This commit is contained in:
Wojciech Figat
2022-01-21 16:23:30 +01:00
parent d36c502287
commit f801e7ffd9
5 changed files with 50 additions and 29 deletions

View File

@@ -52,11 +52,11 @@ 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)
{
// Clean any danging pointer to last task (might stay if engine is disposing after crash)
GPUDevice::Instance->CurrentTask = nullptr;
GPUDevice::Instance->Dispose();
LOG_FLUSH();
Delete(GPUDevice::Instance);