Skip to content

Commit 22d562c

Browse files
authored
fix crash if user does not provide memory when filling (#1980)
for deep frame buffers, when filling, if the caller does not provide output memory for a particular sample set, do not crash. Signed-off-by: Kimball Thurston <[email protected]>
1 parent 928f9a4 commit 22d562c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lib/OpenEXR/ImfDeepScanLineInputFile.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ void ScanLineProcess::run_fill (
926926
int32_t samps = counts[sx];
927927
void *dest = *((void **)outptr);
928928

929-
if (samps == 0)
929+
if (samps == 0 || dest == nullptr)
930930
{
931931
outptr += fills.xStride;
932932
continue;

src/lib/OpenEXR/ImfDeepTiledInputFile.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ void TileProcess::run_fill (
11391139
int32_t samps = counts[sx];
11401140
void *dest = *((void **)outptr);
11411141

1142-
if (samps == 0)
1142+
if (samps == 0 || dest == nullptr)
11431143
{
11441144
outptr += fills.xStride;
11451145
continue;

0 commit comments

Comments
 (0)