mirror of
https://github.com/encounter/cpp3ds.git
synced 2026-07-10 03:18:37 -07:00
Fix Texture destructor bug that crashed when texture was empty
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user