diff options
author | Borja Lorente | 2016-08-26 12:26:29 +0200 |
---|---|---|
committer | Borja Lorente | 2016-08-26 12:27:16 +0200 |
commit | ec6bb1431eb3e54f4a1dddd051cb9b8dfa14f43d (patch) | |
tree | 9f4faf82ac4ad7ccf8a16335c82077d5909b1642 /graphics/nine_patch.cpp | |
parent | 5bba0897246de34318ac6049402b9d5f58722aa4 (diff) | |
download | scummvm-rg350-ec6bb1431eb3e54f4a1dddd051cb9b8dfa14f43d.tar.gz scummvm-rg350-ec6bb1431eb3e54f4a1dddd051cb9b8dfa14f43d.tar.bz2 scummvm-rg350-ec6bb1431eb3e54f4a1dddd051cb9b8dfa14f43d.zip |
GRAPHICS: Fix leak in ninepatch destructor
Diffstat (limited to 'graphics/nine_patch.cpp')
-rw-r--r-- | graphics/nine_patch.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/graphics/nine_patch.cpp b/graphics/nine_patch.cpp index 9cee90864a..56e1202be3 100644 --- a/graphics/nine_patch.cpp +++ b/graphics/nine_patch.cpp @@ -260,8 +260,10 @@ void NinePatchBitmap::blit(Graphics::Surface &target, int dx, int dy, int dw, in } NinePatchBitmap::~NinePatchBitmap() { - if (_destroy_bmp) + if (_destroy_bmp) { + _bmp->free(); delete _bmp; + } } void NinePatchBitmap::drawRegions(Graphics::Surface &target, int dx, int dy, int dw, int dh) { |