summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-05-06 23:11:21 -0600
committerJared Adams <jaxad0127@gmail.com>2010-05-21 12:27:32 -0600
commit910ea1476664d8a11d57eaf8ff7f281bcfacd184 (patch)
treeffed95b63dd38a03b058738f26ad89fb38ed1dfa /src/localplayer.cpp
parentd34dda737ed8af5135c49e269f5ad608cea8d511 (diff)
downloadmana-910ea1476664d8a11d57eaf8ff7f281bcfacd184.tar.gz
mana-910ea1476664d8a11d57eaf8ff7f281bcfacd184.tar.bz2
mana-910ea1476664d8a11d57eaf8ff7f281bcfacd184.tar.xz
mana-910ea1476664d8a11d57eaf8ff7f281bcfacd184.zip
Fix some issues found by Cppcheck
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 0b0e22f5..b06ea456 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -135,6 +135,9 @@ LocalPlayer::~LocalPlayer()
mTargetCursorImages[0][i]->decRef();
mTargetCursorImages[1][i]->decRef();
}
+
+ delete mAwayDialog;
+ delete mAwayListener;
}
void LocalPlayer::logic()
@@ -1433,10 +1436,8 @@ void LocalPlayer::changeAwayMode()
config.getValue("afkMessage", "I am away from keyboard"));
mAwayDialog->addActionListener(mAwayListener);
}
- else
- {
- mAwayDialog = 0;
- }
+
+ mAwayDialog = 0;
}
void LocalPlayer::setAway(const std::string &message)
@@ -1478,4 +1479,4 @@ void AwayListener::action(const gcn::ActionEvent &event)
{
player_node->changeAwayMode();
}
-} \ No newline at end of file
+}