Corregido un "memory leak" en texture.cpp
This commit is contained in:
@@ -103,6 +103,7 @@ bool Texture::loadFromFile(std::string path, SDL_Renderer *renderer, bool verbos
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return success
|
// Return success
|
||||||
|
stbi_image_free(data);
|
||||||
texture = newTexture;
|
texture = newTexture;
|
||||||
return texture != nullptr;
|
return texture != nullptr;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user