Fix mem leak

This commit is contained in:
Johannes Günther
2021-11-29 12:25:00 +01:00
parent 24197032f7
commit 935bd8080a
+3 -1
View File
@@ -139,7 +139,9 @@ namespace rkcommon {
template <typename T>
inline IntrusivePtr<T> &IntrusivePtr<T>::operator=(IntrusivePtr &&input)
{
ptr = input.ptr;
if (ptr && ptr != input.ptr)
ptr->refDec();
ptr = input.ptr;
input.ptr = nullptr;
return *this;
}