mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-26 23:55:46 +00:00
Bullet proof the replay renderer against the proxy going away suddenly
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user