summaryrefslogtreecommitdiff
path: root/src/gui/quitdialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-09-04 20:05:48 +0300
committerAndrei Karas <akaras@inbox.ru>2011-09-04 20:05:48 +0300
commit62ec17f6e489ec50f17219444468aeb8969dc961 (patch)
tree350d7edb5c26c282a4e1906544536d68831228ac /src/gui/quitdialog.cpp
parent71d924d7dcdac067f02a317e9353ee067dbd0bde (diff)
parentfd484fc70fca32ff9065b91c175089b65aa3fd26 (diff)
downloadmanaverse-62ec17f6e489ec50f17219444468aeb8969dc961.tar.gz
manaverse-62ec17f6e489ec50f17219444468aeb8969dc961.tar.bz2
manaverse-62ec17f6e489ec50f17219444468aeb8969dc961.tar.xz
manaverse-62ec17f6e489ec50f17219444468aeb8969dc961.zip
Merge branch 'master' into strippedstripped1.1.9.4
Conflicts: data/fonts/mplus-1p-bold.ttf data/fonts/mplus-1p-regular.ttf src/guichan/basiccontainer.cpp src/guichan/include/guichan/basiccontainer.hpp src/guichan/widgets/window.cpp
Diffstat (limited to 'src/gui/quitdialog.cpp')
-rw-r--r--src/gui/quitdialog.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/gui/quitdialog.cpp b/src/gui/quitdialog.cpp
index f66872b5d..04f43fb88 100644
--- a/src/gui/quitdialog.cpp
+++ b/src/gui/quitdialog.cpp
@@ -41,23 +41,17 @@
#include "utils/gettext.h"
-#include <assert.h>
-
#include "debug.h"
QuitDialog::QuitDialog(QuitDialog** pointerToMe):
Window(_("Quit"), true, NULL), mMyPointer(pointerToMe)
{
-// int width = 200;
-// int height = 120;
-
mForceQuit = new RadioButton(_("Quit"), "quitdialog");
mLogoutQuit = new RadioButton(_("Quit"), "quitdialog");
mSwitchAccountServer = new RadioButton(_("Switch server"), "quitdialog");
mSwitchCharacter = new RadioButton(_("Switch character"), "quitdialog");
mOkButton = new Button(_("OK"), "ok", this);
mCancelButton = new Button(_("Cancel"), "cancel", this);
-// setContentSize(width, height);
addKeyListener(this);
@@ -149,10 +143,11 @@ void QuitDialog::action(const gcn::ActionEvent &event)
}
else if (mSwitchCharacter->isSelected())
{
- assert(Client::getState() == STATE_GAME);
-
- Net::getCharHandler()->switchCharacter();
- Client::closeDialogs();
+ if (Client::getState() == STATE_GAME)
+ {
+ Net::getCharHandler()->switchCharacter();
+ Client::closeDialogs();
+ }
}
}
scheduleDelete();