refptr allows NULL to be assigned to it
This commit is contained in:
parent
df2808afb9
commit
42791de89b
@ -85,7 +85,10 @@ template <typename T> void refptr<T>::destroy()
|
||||
{
|
||||
if (*m_refCount <= 1)
|
||||
{
|
||||
delete m_ptr;
|
||||
if (m_ptr != NULL)
|
||||
{
|
||||
delete m_ptr;
|
||||
}
|
||||
delete m_refCount;
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user