diff --git a/src/core/model/ptr.h b/src/core/model/ptr.h index 3188c1fe9..eee94d40a 100644 --- a/src/core/model/ptr.h +++ b/src/core/model/ptr.h @@ -780,6 +780,7 @@ template T * Ptr::operator -> () { + NS_ASSERT_MSG (m_ptr, "Attempted to dereference zero pointer"); return m_ptr; } @@ -787,6 +788,7 @@ template T * Ptr::operator -> () const { + NS_ASSERT_MSG (m_ptr, "Attempted to dereference zero pointer"); return m_ptr; } @@ -794,6 +796,7 @@ template T & Ptr::operator * () const { + NS_ASSERT_MSG (m_ptr, "Attempted to dereference zero pointer"); return *m_ptr; } @@ -801,6 +804,7 @@ template T & Ptr::operator * () { + NS_ASSERT_MSG (m_ptr, "Attempted to dereference zero pointer"); return *m_ptr; }