diff --git a/addons/io_scene_swbf_msh/msh_to_blend.py b/addons/io_scene_swbf_msh/msh_to_blend.py index 6814fb7..f814332 100644 --- a/addons/io_scene_swbf_msh/msh_to_blend.py +++ b/addons/io_scene_swbf_msh/msh_to_blend.py @@ -26,7 +26,7 @@ def extract_and_apply_anim(filename : str, scene : Scene): arma = bpy.context.view_layer.objects.active - if arma.type != 'ARMATURE': + if not arma or arma.type != 'ARMATURE': raise Exception("Select an armature to attach the imported animation to!") if scene.animation is None: