From 43b21002699c9c9707c742c3b30454487f4329a7 Mon Sep 17 00:00:00 2001 From: Stefan Dombrowski Date: Mon, 14 Dec 2009 07:19:44 +0100 Subject: Fixing a crash when pressing escape in charselectdialog The old code gave an exception fault, because when escape was pressed then event.getSource() was a null pointer. This resolves http://mantis.themanaworld.org/view.php?id=685 --- src/gui/charselectdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/charselectdialog.cpp b/src/gui/charselectdialog.cpp index 4f3619ae..8dc292ab 100644 --- a/src/gui/charselectdialog.cpp +++ b/src/gui/charselectdialog.cpp @@ -226,7 +226,7 @@ void CharSelectDialog::keyPressed(gcn::KeyEvent &keyEvent) if (key.getValue() == Key::ESCAPE) { - action(gcn::ActionEvent(NULL, mSwitchLoginButton->getActionEventId())); + action(gcn::ActionEvent(mSwitchLoginButton, mSwitchLoginButton->getActionEventId())); } } -- cgit v1.2.3-70-g09d2