load_map: avoid segfault when ShieldSymbolizer has invalid placements
This commit is contained in:
parent
489b7f2aca
commit
3fbe7f61a6
1 changed files with 7 additions and 3 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue