Bullet proof the replay renderer against the proxy going away suddenly

This commit is contained in:
baldurk
2016-08-23 13:37:24 +02:00
parent 81b6b0653b
commit a8cfc753df
3 changed files with 44 additions and 4 deletions
+6 -3
View File
@@ -482,13 +482,16 @@ bool ReplayRenderer::GetTextureData(ResourceId tex, uint32_t arrayIdx, uint32_t
return false;
}
size_t sz;
size_t sz = 0;
byte *bytes =
m_pDevice->GetTextureData(liveId, arrayIdx, mip, eCompType_None, false, false, 0.0f, 0.0f, sz);
create_array_init(*data, sz, bytes);
if(sz == 0 || bytes == NULL)
create_array_uninit(*data, 0);
else
create_array_init(*data, sz, bytes);
delete[] bytes;
SAFE_DELETE_ARRAY(bytes);
return true;
}