From 4c9e52b364d6dad5326afbd744a80a786c8062fd Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Wed, 9 Oct 2024 16:16:01 -0700 Subject: [PATCH] Minor code review --- Utilities/WaveFrontReader.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Utilities/WaveFrontReader.h b/Utilities/WaveFrontReader.h index 99fb5ec..26e29d7 100644 --- a/Utilities/WaveFrontReader.h +++ b/Utilities/WaveFrontReader.h @@ -589,13 +589,13 @@ namespace DX HRESULT LoadVBO(_In_z_ const wchar_t* szFileName) { + Clear(); + if (!szFileName) return E_INVALIDARG; using namespace DirectX; - Clear(); - #ifdef _WIN32 wchar_t fname[_MAX_FNAME] = {}; _wsplitpath_s(szFileName, nullptr, 0, nullptr, 0, fname, _MAX_FNAME, nullptr, 0);