7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-11 12:30:14 +00:00

svg importer: fix a crash when importing some files with no graphic item

This commit is contained in:
jean-pierre charras 2022-02-27 09:59:42 +01:00
parent a178de8744
commit 8de4f762e1

View File

@ -207,7 +207,11 @@ void GRAPHICS_IMPORTER_BUFFER::PostprocessNestedPolygons()
}
}
convertPolygon( newShapes, polypaths, m_shapeFillRules[curShapeIdx], lastWidth );
POLY_FILL_RULE last_rule = curShapeIdx>= 0 && m_shapeFillRules.size()
? m_shapeFillRules[curShapeIdx]
: POLY_FILL_RULE::PF_EVEN_ODD;
convertPolygon( newShapes, polypaths, last_rule, lastWidth );
m_shapes.swap( newShapes );
}