mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Handle failed allocation in EXR image viewing path
This commit is contained in:
@@ -609,6 +609,12 @@ void ImageViewer::RefreshFile()
|
||||
datasize = texDetails.width * texDetails.height * 4 * sizeof(float);
|
||||
data = (byte *)malloc(datasize);
|
||||
|
||||
if(!data)
|
||||
{
|
||||
RDCERR("Allocation for %zu bytes failed for EXR data", datasize);
|
||||
return;
|
||||
}
|
||||
|
||||
int channels[4] = {-1, -1, -1, -1};
|
||||
for(int i = 0; i < exrImage.num_channels; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user