Core/ObjectHandle: Fix self-movement case

This commit is contained in:
Lynix 2017-03-25 10:12:01 +01:00
parent 02508fb99d
commit 6d0314741a
1 changed files with 3 additions and 0 deletions

View File

@ -128,6 +128,9 @@ namespace Nz
template<typename T>
void ObjectHandle<T>::Reset(ObjectHandle&& handle) noexcept
{
if (this == &handle)
return;
if (m_object)
m_object->UnregisterHandle(this);