From fca82b1f34c9c4dae990c60300ceda00632dbf08 Mon Sep 17 00:00:00 2001 From: Mario Voigt Date: Tue, 19 Oct 2021 03:11:58 +0200 Subject: [PATCH] small fix --- extensions/fablabchemnitz/styles_to_layers/styles_to_layers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/fablabchemnitz/styles_to_layers/styles_to_layers.py b/extensions/fablabchemnitz/styles_to_layers/styles_to_layers.py index ac63536c..2ab229dc 100644 --- a/extensions/fablabchemnitz/styles_to_layers/styles_to_layers.py +++ b/extensions/fablabchemnitz/styles_to_layers/styles_to_layers.py @@ -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: