mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-03 21:45:32 +02:00
Fix major memory leak in Bitmap::initFromSurface
c89f3d5bd7
accidentally completely removed the call to free the surface when successfully creating a texture.
This commit is contained in:
parent
23e9f6cb1c
commit
9221cc7ec2
1 changed files with 2 additions and 0 deletions
|
@ -872,6 +872,8 @@ void Bitmap::initFromSurface(SDL_Surface *imgSurf, Bitmap *hiresBitmap, bool for
|
|||
|
||||
TEX::bind(p->gl.tex);
|
||||
TEX::uploadImage(p->gl.width, p->gl.height, imgSurf->pixels, GL_RGBA);
|
||||
|
||||
SDL_FreeSurface(imgSurf);
|
||||
}
|
||||
|
||||
p->addTaintedArea(rect());
|
||||
|
|
Loading…
Add table
Reference in a new issue