load_map: avoid segfault when ShieldSymbolizer has invalid placements

This commit is contained in:
Mickey Rose 2017-02-22 03:21:48 +01:00
parent 489b7f2aca
commit 3fbe7f61a6

View file

@ -1155,10 +1155,14 @@ void map_parser::parse_shield_symbolizer(rule & rule, xml_node const& node)
if (placement_type)
{
placements = placements::registry::instance().from_xml(*placement_type, node, fontsets_, true);
} else {
placements = std::make_shared<text_placements_dummy>();
if (!placements)
return;
}
else
{
placements = std::make_shared<text_placements_dummy>();
placements->defaults.from_xml(node, fontsets_, true);
}
if (strict_ &&
!placements->defaults.format_defaults.fontset)
{