Handle failed allocation in EXR image viewing path

This commit is contained in:
baldurk
2021-01-18 13:23:22 +00:00
parent 2070e74cf1
commit c1c36f06ba
+6
View File
@@ -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++)
{