diff --git a/deps/ox/src/ox/fs/filestore/ptr.hpp b/deps/ox/src/ox/fs/filestore/ptr.hpp index 5e453247..55bf1d27 100644 --- a/deps/ox/src/ox/fs/filestore/ptr.hpp +++ b/deps/ox/src/ox/fs/filestore/ptr.hpp @@ -71,6 +71,7 @@ inline size_t Ptr::offset() const { template inline T *Ptr::operator->() const { + ox_assert(valid(), "Invalid pointer access. (ox::fs::Ptr::operator->())"); return reinterpret_cast(m_dataStart + m_itemStart); } @@ -89,6 +90,7 @@ inline Ptr::operator size_t() const { template inline T &Ptr::operator*() const { + ox_assert(valid(), "Invalid pointer dereference. (ox::fs::Ptr::operator*())"); return *static_cast(this); }