fix(handle): update with new STORM_VALIDATE macro

This commit is contained in:
phaneron 2025-03-31 20:17:33 -04:00
parent 3baccc8168
commit 9039ff45c5

View file

@ -3,8 +3,9 @@
#include <storm/Error.hpp> #include <storm/Error.hpp>
HOBJECT HandleCreate(CHandleObject* ptr) { HOBJECT HandleCreate(CHandleObject* ptr) {
STORM_ASSERT(ptr); STORM_VALIDATE_BEGIN;
STORM_VALIDATE(ptr, ERROR_INVALID_PARAMETER, nullptr); STORM_VALIDATE(ptr);
STORM_VALIDATE_END;
ptr->m_refcount++; ptr->m_refcount++;
return reinterpret_cast<HOBJECT>(ptr); return reinterpret_cast<HOBJECT>(ptr);