File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,9 @@ namespace
86
86
87
87
HRESULT ReadData (_In_z_ const wchar_t * szFile, std::unique_ptr<uint8_t []>& blob, size_t & blobSize)
88
88
{
89
+ if (!szFile)
90
+ return E_INVALIDARG;
91
+
89
92
blob.reset ();
90
93
91
94
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8)
@@ -361,6 +364,9 @@ HRESULT __cdecl SaveToPortablePixMap(
361
364
_In_ const Image& image,
362
365
_In_z_ const wchar_t * szFile) noexcept
363
366
{
367
+ if (!szFile)
368
+ return E_INVALIDARG;
369
+
364
370
switch (image.format )
365
371
{
366
372
case DXGI_FORMAT_R8G8B8A8_UNORM:
@@ -688,6 +694,9 @@ HRESULT __cdecl SaveToPortablePixMapHDR(
688
694
_In_ const Image& image,
689
695
_In_z_ const wchar_t * szFile) noexcept
690
696
{
697
+ if (!szFile)
698
+ return E_INVALIDARG;
699
+
691
700
switch (image.format )
692
701
{
693
702
case DXGI_FORMAT_R32G32B32A32_FLOAT:
You can’t perform that action at this time.
0 commit comments