summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-05 21:09:49 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-05 21:09:49 +0300
commite39429ce4e219bd577f1adb2c98f04e614b57ceb (patch)
tree6ca7388440dd43d5a072916b28407fb58d250cbb /src/gui/widgets
parentbef65b44075a5c918821f1360804ff5f9f2a32ed (diff)
downloadmanaplus-e39429ce4e219bd577f1adb2c98f04e614b57ceb.tar.gz
manaplus-e39429ce4e219bd577f1adb2c98f04e614b57ceb.tar.bz2
manaplus-e39429ce4e219bd577f1adb2c98f04e614b57ceb.tar.xz
manaplus-e39429ce4e219bd577f1adb2c98f04e614b57ceb.zip
Fix termination memory leaks after adding batch draw.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/shortcutcontainer.cpp6
-rw-r--r--src/gui/widgets/shortcutcontainer.h3
2 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/widgets/shortcutcontainer.cpp b/src/gui/widgets/shortcutcontainer.cpp
index c421a4bdb..eae6e3ff7 100644
--- a/src/gui/widgets/shortcutcontainer.cpp
+++ b/src/gui/widgets/shortcutcontainer.cpp
@@ -49,6 +49,12 @@ ShortcutContainer::ShortcutContainer() :
{
}
+ShortcutContainer::~ShortcutContainer()
+{
+ delete mVertexes;
+ mVertexes = nullptr;
+}
+
void ShortcutContainer::widgetResized(const gcn::Event &event A_UNUSED)
{
mGridWidth = getWidth() / mBoxWidth;
diff --git a/src/gui/widgets/shortcutcontainer.h b/src/gui/widgets/shortcutcontainer.h
index b331782fb..999da22d5 100644
--- a/src/gui/widgets/shortcutcontainer.h
+++ b/src/gui/widgets/shortcutcontainer.h
@@ -53,8 +53,7 @@ class ShortcutContainer : public gcn::Widget,
/**
* Destructor.
*/
- ~ShortcutContainer()
- { }
+ ~ShortcutContainer();
/**
* Draws the shortcuts