summaryrefslogtreecommitdiff
path: root/src/gui/npcdialog.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-05-09 00:32:18 -0600
committerJared Adams <jaxad0127@gmail.com>2009-05-09 00:33:12 -0600
commit3074acf977841492b2378b5542bc3d755cf0a227 (patch)
treec925bea4d6d401f7ebeb03685f901f7adb9d24e2 /src/gui/npcdialog.cpp
parent2c409c2226f848c39fa0d371b56855d011c682db (diff)
downloadmana-3074acf977841492b2378b5542bc3d755cf0a227.tar.gz
mana-3074acf977841492b2378b5542bc3d755cf0a227.tar.bz2
mana-3074acf977841492b2378b5542bc3d755cf0a227.tar.xz
mana-3074acf977841492b2378b5542bc3d755cf0a227.zip
Fix some memory leaks
In doing so, NPC Dialogs now show the resize grip again.
Diffstat (limited to 'src/gui/npcdialog.cpp')
-rw-r--r--src/gui/npcdialog.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp
index 64101c0c..57c736d0 100644
--- a/src/gui/npcdialog.cpp
+++ b/src/gui/npcdialog.cpp
@@ -110,6 +110,16 @@ NpcDialog::NpcDialog()
loadWindowState();
}
+NpcDialog::~NpcDialog()
+{
+ // These might not actually be in the layout, so lets be safe
+ delete mItemList;
+ delete mTextField;
+ delete mIntField;
+ delete mResetButton;
+ delete mPlusButton;
+ delete mMinusButton;
+}
void NpcDialog::setText(const std::string &text)
{
@@ -282,6 +292,8 @@ void NpcDialog::buildLayout()
{
clearLayout();
+ add(mGrip);
+
if (mActionState != NPC_ACTION_INPUT)
{
if (mActionState == NPC_ACTION_WAIT)