Fix assertion during engine shutdown after crash during rendering

This commit is contained in:
Wojtek Figat
2021-01-20 13:12:11 +01:00
parent ea489fbf2a
commit ef5e98efaa

View File

@@ -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();