diff --git a/strings/base_com_ptr.h b/strings/base_com_ptr.h index 1c7536e0f..66dd2c9e7 100644 --- a/strings/base_com_ptr.h +++ b/strings/base_com_ptr.h @@ -111,7 +111,7 @@ WINRT_EXPORT namespace winrt type** put() noexcept { - WINRT_ASSERT(m_ptr == nullptr); + release_ref(); return &m_ptr; } diff --git a/strings/base_handle.h b/strings/base_handle.h index 60eec8be0..7a65af7b3 100644 --- a/strings/base_handle.h +++ b/strings/base_handle.h @@ -52,7 +52,7 @@ WINRT_EXPORT namespace winrt type* put() noexcept { - WINRT_ASSERT(m_value == T::invalid()); + close(); return &m_value; }