Fix crash when streaming texture with unsupported format by the GPU driver

This commit is contained in:
Wojtek Figat
2021-11-04 16:47:43 +01:00
parent 2b05b80b54
commit 4b735a365b
2 changed files with 9 additions and 0 deletions

View File

@@ -497,6 +497,8 @@ bool GPUTexture::Init(const GPUTextureDescription& desc)
if (OnInit())
{
ReleaseGPU();
_desc.Clear();
_residentMipLevels = 0;
LOG(Warning, "Cannot initialize texture. Description: {0}", desc.ToString());
return true;
}