Commit 9836b2cb authored by NTAuthority's avatar NTAuthority

game universe argument parsing: fail parsing on a null pointer

parent c98bec5f
Pipeline #49 skipped
......@@ -85,6 +85,13 @@ struct ConsoleArgumentType<GameUniversePtr>
static bool Parse(const std::string& input, GameUniversePtr* out)
{
*out = theGame->GetUniverse(input);
// fail to parse if there's no such universe
if (!*out)
{
return false;
}
return true;
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment