From b282f5534287692cce83508ab7e7e850ea6cb0ad Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Sat, 17 Dec 2016 11:25:08 +0300 Subject: [PATCH] Fix issues found by Udo Steinbach --- include/boost/stacktrace/detail/backend_windows.hpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/include/boost/stacktrace/detail/backend_windows.hpp b/include/boost/stacktrace/detail/backend_windows.hpp index 8bfd61a..9701c70 100644 --- a/include/boost/stacktrace/detail/backend_windows.hpp +++ b/include/boost/stacktrace/detail/backend_windows.hpp @@ -46,22 +46,14 @@ public: return !!holder_; } - void reset() const BOOST_NOEXCEPT { + ~com_holder() BOOST_NOEXCEPT { if (holder_) { holder_->Release(); } } - - ~com_holder() BOOST_NOEXCEPT { - reset(); - } }; inline bool try_init_com(com_holder& idebug_) BOOST_NOEXCEPT { - if (idebug_.is_inited()) { - return true; - } - CoInitializeEx(0, COINIT_MULTITHREADED); com_holder iclient; @@ -86,7 +78,6 @@ inline bool try_init_com(com_holder& idebug_) BOOST_NOEXCEPT { const bool res = (S_OK == iclient->QueryInterface(__uuidof(IDebugSymbols), idebug_.to_void_ptr_ptr())); if (!res) { - idebug_.reset(); return false; }