Skip to content

Commit

Permalink
WaveFrontReader should check for null parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Oct 9, 2024
1 parent 0c4f28c commit 3d519cd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Utilities/WaveFrontReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ namespace DX
{
Clear();

if (!szFileName)
return E_INVALIDARG;

constexpr size_t MAX_POLY = 64;

using namespace DirectX;
Expand Down Expand Up @@ -421,6 +424,9 @@ namespace DX

HRESULT LoadMTL(_In_z_ const wchar_t* szFileName)
{
if (!szFileName)
return E_INVALIDARG;

using namespace DirectX;

// Assumes MTL is in CWD along with OBJ
Expand Down Expand Up @@ -583,6 +589,9 @@ namespace DX

HRESULT LoadVBO(_In_z_ const wchar_t* szFileName)
{
if (!szFileName)
return E_INVALIDARG;

using namespace DirectX;

Clear();
Expand Down

0 comments on commit 3d519cd

Please sign in to comment.