added a check for missing data in menu

This commit is contained in:
Mark Vejvoda 2013-11-16 10:02:32 +00:00
parent 77fba5a65e
commit aa1efb5d3a
1 changed files with 6 additions and 4 deletions

View File

@ -2223,8 +2223,9 @@ void MenuStateCustomGame::switchSetupForSlots(SwitchSetupRequest **switchSetupRe
ConnectionSlot *slot = serverInterface->getSlot(newFactionIdx);
if(switchSetupRequests[i]->getSelectedFactionName() != "" &&
(slot != NULL && switchSetupRequests[i]->getSelectedFactionName() !=
Lang::getInstance().getString("DataMissing",slot->getNetworkPlayerLanguage(),true))) {
(slot != NULL &&
switchSetupRequests[i]->getSelectedFactionName() != Lang::getInstance().getString("DataMissing",slot->getNetworkPlayerLanguage(),true) &&
switchSetupRequests[i]->getSelectedFactionName() != "???DataMissing???")) {
listBoxFactions[newFactionIdx].setSelectedItem(switchSetupRequests[i]->getSelectedFactionName());
}
if(switchSetupRequests[i]->getToTeam() != -1) {
@ -2260,8 +2261,9 @@ void MenuStateCustomGame::switchSetupForSlots(SwitchSetupRequest **switchSetupRe
ConnectionSlot *slot = serverInterface->getSlot(factionIdx);
if(switchSetupRequests[i]->getSelectedFactionName() != "" &&
(slot != NULL && switchSetupRequests[i]->getSelectedFactionName() !=
Lang::getInstance().getString("DataMissing",slot->getNetworkPlayerLanguage(),true))) {
(slot != NULL &&
switchSetupRequests[i]->getSelectedFactionName() != Lang::getInstance().getString("DataMissing",slot->getNetworkPlayerLanguage(),true) &&
switchSetupRequests[i]->getSelectedFactionName() != "???DataMissing???")) {
listBoxFactions[i].setSelectedItem(switchSetupRequests[i]->getSelectedFactionName());
}
if(switchSetupRequests[i]->getToTeam() != -1) {