summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
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
+}