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