fix accessing None

This commit is contained in:
jrkb 2025-05-18 18:46:35 +02:00
parent 6c3ad47cb6
commit ca8b4302a3

View file

@ -724,7 +724,7 @@ class ABC3D_PT_TextPropertiesPanel(bpy.types.Panel):
if f"{utils.prefix()}_linked_textobject" in a_o:
text_index = a_o[f"{utils.prefix()}_linked_textobject"]
return bpy.context.scene.abc3d_data.available_texts[text_index]
elif f"{utils.prefix()}_linked_textobject" in a_o.parent:
elif a_o.parent is not None and f"{utils.prefix()}_linked_textobject" in a_o.parent:
text_index = a_o.parent[f"{utils.prefix()}_linked_textobject"]
return bpy.context.scene.abc3d_data.available_texts[text_index]
else: