small fix

This commit is contained in:
Mario Voigt 2021-10-19 03:11:58 +02:00
parent 808e599437
commit fca82b1f34
1 changed files with 2 additions and 1 deletions

View File

@ -295,7 +295,8 @@ class StylesToLayers(inkex.EffectExtension):
#call does not apply for this so we need to do it as PREVIOUS step before!
for i in range(0, len(layerNodeList)):
if len(layerNodeList[i][0]) == 0:
layerNodeList[i][0].getparent().remove(layerNodeList[i][0])
if layerNodeList[i][0].getparent() is not None:
layerNodeList[i][0].getparent().remove(layerNodeList[i][0])
if self.options.cleanup == True:
try: