From 3ac925b7d1da07020130529f2c35c6a01edadce7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 16 Mar 2011 22:25:31 +0000 Subject: [PATCH] fix own error - missing NULL check [#26523] Crash when load factory settings ( linked to rigify add-on ? ) --- source/blender/python/intern/bpy_rna.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 36e636dc11d..81ab52ca54a 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -2967,7 +2967,7 @@ static PyObject *pyrna_struct_meta_idprop_getattro(PyObject *cls, PyObject *attr static int pyrna_struct_meta_idprop_setattro(PyObject *cls, PyObject *attr, PyObject *value) { StructRNA *srna= srna_from_self(cls, "StructRNA.__setattr__"); - const int is_deferred_prop= pyrna_is_deferred_prop(value); + const int is_deferred_prop= (value && pyrna_is_deferred_prop(value)); if(srna && !pyrna_write_check() && (is_deferred_prop || RNA_struct_type_find_property(srna, _PyUnicode_AsString(attr)))) { PyErr_Format(PyExc_AttributeError, "pyrna_struct_meta_idprop_setattro() can't set in readonly state '%.200s.%S'", ((PyTypeObject *)cls)->tp_name, attr);