Page MenuHome

Segmentation fault on assigning None to the data of an empty object using python.
Closed, ResolvedPublic

Description

Executing bpy.data.objects["Empty"].data = None where Empty is an empty object causes a segmentation fault. This is caused by the following check in rna_Object_data_set:

if ((id->tag & LIB_TAG_NO_MAIN) != (ob->id.tag & LIB_TAG_NO_MAIN))

Which was introduced in rB34d676. In particular, we are dereferencing the variable id which is null in this case.