diff --git a/deps/ox/src/ox/ptrarith/ptr.hpp b/deps/ox/src/ox/ptrarith/ptr.hpp index 6c9154e2..81ad934b 100644 --- a/deps/ox/src/ox/ptrarith/ptr.hpp +++ b/deps/ox/src/ox/ptrarith/ptr.hpp @@ -147,11 +147,15 @@ inline T *Ptr::operator->() { template inline Ptr::operator const T*() const { + oxAssert(m_validated, "Unvalidated pointer access. (ox::fs::Ptr::operator const T*())"); + oxAssert(valid(), "Invalid pointer access. (ox::fs::Ptr::operator const T*())"); return reinterpret_cast(m_dataStart + m_itemOffset); } template inline Ptr::operator T*() { + oxAssert(m_validated, "Unvalidated pointer access. (ox::fs::Ptr::operator T*())"); + oxAssert(valid(), "Invalid pointer access. (ox::fs::Ptr::operator T*())"); return reinterpret_cast(m_dataStart + m_itemOffset); }