diff --git a/source/__init__.py b/source/__init__.py index 516f4e0..6ea3b22 100644 --- a/source/__init__.py +++ b/source/__init__.py @@ -466,7 +466,7 @@ def curve_tools_context_menu(self, context): def curve_tools_object_context_menu(self, context): bl_label = 'Curve tools' - if context.active_object.type == "CURVE": + if (obj := context.active_object) and obj.type == "CURVE": self.layout.operator("curvetools.scale_reset", text="Scale Reset") self.layout.operator("curvetools.add_toolpath_offset_curve", text="Offset Curve") self.layout.operator("curvetools.remove_doubles", text='Remove Doubles')