diff --git a/src/cpp3ds/Graphics/Texture.cpp b/src/cpp3ds/Graphics/Texture.cpp index 6265daa..f3d2855 100644 --- a/src/cpp3ds/Graphics/Texture.cpp +++ b/src/cpp3ds/Graphics/Texture.cpp @@ -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; + } }