forked from bartvdbraak/blender
fix own error - missing NULL check [#26523] Crash when load factory settings ( linked to rigify add-on ? )
This commit is contained in:
parent
dc5a78ac25
commit
3ac925b7d1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user