aboutsummaryrefslogtreecommitdiff
path: root/backends/vkeybd/virtual-keyboard.h
diff options
context:
space:
mode:
Diffstat (limited to 'backends/vkeybd/virtual-keyboard.h')
-rw-r--r--backends/vkeybd/virtual-keyboard.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/backends/vkeybd/virtual-keyboard.h b/backends/vkeybd/virtual-keyboard.h
index 2c31afcb35..66f5f8b4ea 100644
--- a/backends/vkeybd/virtual-keyboard.h
+++ b/backends/vkeybd/virtual-keyboard.h
@@ -121,7 +121,13 @@ protected:
OverlayColor displayFontColor;
Mode() : image(0) {}
- ~Mode() { delete image; }
+ ~Mode() {
+ if (image) {
+ image->free();
+ delete image;
+ image = 0;
+ }
+ }
};
typedef HashMap<String, Mode, IgnoreCase_Hash, IgnoreCase_EqualTo> ModeMap;