summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-03-07 22:28:32 +0300
committerAndrei Karas <akaras@inbox.ru>2012-03-08 00:13:43 +0300
commitae5572d5c0e193868db93ba3167594da3df769ef (patch)
tree9e6ef5d3ed24944af574cebcf5d8c979f5026da1
parent61481dcdbc3f76bb4aff43de15b981be8b1e56ca (diff)
downloadplus-ae5572d5c0e193868db93ba3167594da3df769ef.tar.gz
plus-ae5572d5c0e193868db93ba3167594da3df769ef.tar.bz2
plus-ae5572d5c0e193868db93ba3167594da3df769ef.tar.xz
plus-ae5572d5c0e193868db93ba3167594da3df769ef.zip
Restore volume in disconnect in afk mode.
-rw-r--r--src/localplayer.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 1acc6a938..e8c218292 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -208,8 +208,12 @@ LocalPlayer::~LocalPlayer()
config.removeListeners(this);
serverConfig.removeListener("enableBuggyServers", this);
- delete mAwayDialog;
- mAwayDialog = nullptr;
+ if (mAwayDialog)
+ {
+ sound.volumeRestore();
+ delete mAwayDialog;
+ mAwayDialog = nullptr;
+ }
delete mAwayListener;
mAwayListener = nullptr;
}