diff --git a/DirectXTex/DirectXTexCompressGPU.cpp b/DirectXTex/DirectXTexCompressGPU.cpp index 69195562..fcbf6a3d 100644 --- a/DirectXTex/DirectXTexCompressGPU.cpp +++ b/DirectXTex/DirectXTexCompressGPU.cpp @@ -261,6 +261,9 @@ HRESULT DirectX::CompressEx( || IsTypeless(srcImage.format) || IsPlanar(srcImage.format) || IsPalettized(srcImage.format)) return HRESULT_E_NOT_SUPPORTED; + if (!srcImage.pixels) + return E_POINTER; + // Setup GPU compressor std::unique_ptr gpubc(new (std::nothrow) GPUCompressBC); if (!gpubc)