diff --git a/luna/include/luna/SharedPtr.h b/luna/include/luna/SharedPtr.h index 3e1a9f2e..b645a6aa 100644 --- a/luna/include/luna/SharedPtr.h +++ b/luna/include/luna/SharedPtr.h @@ -30,6 +30,12 @@ template class SharedPtr using RefCount = __detail::RefCount; public: + SharedPtr() + { + m_ptr = nullptr; + m_ref_count = nullptr; + } + SharedPtr(T* ptr, RefCount* ref_count) : m_ptr(ptr), m_ref_count(ref_count) { }