Skip to content

Commit 31b6ea5

Browse files
committed
Extra check for a null pointer
1 parent ab623b6 commit 31b6ea5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

DirectXTex/DirectXTexCompressGPU.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ HRESULT DirectX::CompressEx(
261261
|| IsTypeless(srcImage.format) || IsPlanar(srcImage.format) || IsPalettized(srcImage.format))
262262
return HRESULT_E_NOT_SUPPORTED;
263263

264+
if (!srcImage.pixels)
265+
return E_POINTER;
266+
264267
// Setup GPU compressor
265268
std::unique_ptr<GPUCompressBC> gpubc(new (std::nothrow) GPUCompressBC);
266269
if (!gpubc)

0 commit comments

Comments
 (0)