Fixed a bug that assignment of NULL to Handle<T> caused a crash
This commit is contained in:
parent
fd44dbe967
commit
4788b751fb
@ -76,7 +76,7 @@ namespace spades {
|
||||
}
|
||||
T *old = ptr;
|
||||
ptr = p;
|
||||
if(add)
|
||||
if(add && ptr)
|
||||
ptr->AddRef();
|
||||
if(old)
|
||||
old->Release();
|
||||
|
Loading…
x
Reference in New Issue
Block a user