refptr allows NULL to be assigned to it
This commit is contained in:
1 parent
df2808afb9
commit
42791de89b
1 file changed
+3
@@ -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
|
||||||
|
|||||||
Reference in new issue
Block a user