diff --git a/vmime/utility/smartPtr.hpp b/vmime/utility/smartPtr.hpp index 411983f3..1c1a1d20 100644 --- a/vmime/utility/smartPtr.hpp +++ b/vmime/utility/smartPtr.hpp @@ -475,6 +475,14 @@ public: return *this; } + ref toStrong() + { + if (m_ptr == NULL) + return ref (); + + return ref ::fromPtr(m_ptr); + } + // Implicit non-const => const conversion operator weak_ref () const {