Skip to content

Commit

Permalink
Fix pelicanmapping#66 JSON assertion failure
Browse files Browse the repository at this point in the history
  • Loading branch information
gwaldron committed Dec 20, 2024
1 parent db5c7a0 commit ad5e27b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/rocky/vsg/MapNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ MapNode::from_json(const std::string& JSON, const IOOptions& io)

Status status = j.status;

if (status.ok() && map)
{
status = map->from_json(j["map"].dump(), io);
if (status.ok() && map && j.contains("map"))
{
status = map->from_json(j.at("map").dump(), io);
}

if (status.ok() && terrainNode)
if (status.ok() && terrainNode && j.contains("terrain"))
{
status = terrainNode->from_json(j["terrain"].dump(), io);
status = terrainNode->from_json(j.at("map").dump(), io);
}

return status;
Expand Down

0 comments on commit ad5e27b

Please sign in to comment.