meerk40t / svgelements

SVG Parsing for Elements, Paths, and other SVG Objects.
MIT License
133 stars 29 forks source link

Crash if ID in values but not attributes during a lookup. #101

Closed tatarize closed 3 years ago

tatarize commented 3 years ago
  File "meerk40t\svgelements.py", line 8231, in parse
KeyError: 'id'
                    if SVG_ATTR_ID in values and root is not None:
                        root.objects[attributes[SVG_ATTR_ID]] = s

This code checks root.objects for the lookup within attributes[id] but there's no guarantee that id exists in attributes if it exists in values.