diff --git a/source/game/StarUniverseServer.cpp b/source/game/StarUniverseServer.cpp index f1ec9ca..9085db9 100644 --- a/source/game/StarUniverseServer.cpp +++ b/source/game/StarUniverseServer.cpp @@ -657,8 +657,9 @@ void UniverseServer::updateShips() { if (auto shipWorld = getWorld(ClientShipWorldId(p.second->playerUuid()))) { shipWorld->executeAction([&](WorldServerThread*, WorldServer* shipWorld) { String species; - if (auto jSpecies = shipWorld->getProperty("ship.species").optString()) - species = *jSpecies; + Json jSpecies = shipWorld->getProperty("ship.species"); + if (jSpecies.isType(Json::Type::String)) + species = jSpecies.toString(); else shipWorld->setProperty("ship.species", species = p.second->playerSpecies());