Fix texture leak in guiEngine (iOS)

This commit is contained in:
sfan5 2018-01-04 15:37:38 +01:00 committed by Maksim Gamarnik
parent 17b4597840
commit 0afcdea2a5
1 changed files with 2 additions and 0 deletions

View File

@ -93,6 +93,8 @@ video::ITexture* MenuTextureSource::getTexture(const std::string &name, u32 *id)
m_to_delete.insert(name);
#if defined(__ANDROID__) || defined(__IOS__)
if (m_driver->findTexture(name.c_str()) != NULL)
return m_driver->findTexture(name.c_str());
video::IImage *image = m_driver->createImageFromFile(name.c_str());
if (image) {
image = Align2Npot2(image, m_driver);