summaryrefslogtreecommitdiff
path: root/src/gui/charselectdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/charselectdialog.cpp')
-rw-r--r--src/gui/charselectdialog.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/gui/charselectdialog.cpp b/src/gui/charselectdialog.cpp
index a212d08c4..95f76d228 100644
--- a/src/gui/charselectdialog.cpp
+++ b/src/gui/charselectdialog.cpp
@@ -530,16 +530,19 @@ bool CharSelectDialog::selectByName(const std::string &name,
for (int i = 0; i < static_cast<int>(mCharacterEntries.size()); ++i)
{
- Net::Character *character = mCharacterEntries[i]->getCharacter();
- if (mCharacterEntries[i] && character)
+ if (mCharacterEntries[i])
{
- if (character->dummy && character->dummy->getName() == name)
+ Net::Character *character = mCharacterEntries[i]->getCharacter();
+ if (character)
{
- if (mCharacterEntries[i])
- mCharacterEntries[i]->requestFocus();
- if (selAction == Choose)
- attemptCharacterSelect(i);
- return true;
+ if (character->dummy && character->dummy->getName() == name)
+ {
+ if (mCharacterEntries[i])
+ mCharacterEntries[i]->requestFocus();
+ if (selAction == Choose)
+ attemptCharacterSelect(i);
+ return true;
+ }
}
}
}