From e82b3276053db4e76776edff0da564d107bb31ab Mon Sep 17 00:00:00 2001 From: crypto-ape <43807588+crypto-ape@users.noreply.github.com> Date: Tue, 2 Apr 2019 12:31:56 +0200 Subject: [PATCH] sanitize shared_ptr --- include/fc/shared_ptr.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fc/shared_ptr.hpp b/include/fc/shared_ptr.hpp index cd6a94c..a07ec46 100644 --- a/include/fc/shared_ptr.hpp +++ b/include/fc/shared_ptr.hpp @@ -46,7 +46,7 @@ namespace fc { shared_ptr( shared_ptr&& p ) :_ptr(p._ptr){ p._ptr = nullptr; } - ~shared_ptr() { if( nullptr != _ptr ) { _ptr->release(); } } + ~shared_ptr() { if( nullptr != _ptr ) { _ptr->release(); _ptr = nullptr; } } shared_ptr& reset( T* v = nullptr, bool inc = false ) { if( v == _ptr ) return *this;