Commit 43cab792 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Revert "Internal: Don't throw when wrapping a null instance"

This reverts commit 9d2e6edb.
This makes more sense, since most of libvlc_*_release functions will
either assert or assume that the given pointer is non null.
Since shared_ptr will call the deleter for any pointer (including
nullptr), we're better of refusing to wrap a pointer and avoid undefined
parent 3ee657c1
......@@ -68,6 +68,8 @@ class Internal
Internal( InternalPtr obj, Releaser releaser )
: m_obj{ obj, releaser }
if ( obj == nullptr )
throw std::runtime_error("Wrapping a NULL instance");
Internal(Releaser releaser)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment