Fixed a bug that assignment of NULL to Handle<T> caused a crash

This commit is contained in:
yvt 2013-11-24 00:17:28 +09:00
parent fd44dbe967
commit 4788b751fb

View File

@ -76,7 +76,7 @@ namespace spades {
}
T *old = ptr;
ptr = p;
if(add)
if(add && ptr)
ptr->AddRef();
if(old)
old->Release();