Fix Texture destructor bug that crashed when texture was empty

This commit is contained in:
Thomas Edvalson
2016-07-25 05:13:04 -04:00
parent 244fba8495
commit 20345e31bc
+4 -3
View File
@@ -152,11 +152,12 @@ m_cacheId (getUniqueId())
////////////////////////////////////////////////////////////
Texture::~Texture()
{
if (m_ownsData)
C3D_TexDelete(m_texture);
if (m_texture)
{
if (m_ownsData)
C3D_TexDelete(m_texture);
delete m_texture;
}
}