refptr allows NULL to be assigned to it

This commit is contained in:
Josh Holtrop 2012-11-04 08:09:30 -05:00
parent df2808afb9
commit 42791de89b

View File

@ -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