aboutsummaryrefslogtreecommitdiff
path: root/graphics/nine_patch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/nine_patch.cpp')
-rw-r--r--graphics/nine_patch.cpp4
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) {