fix [#30906] dict(prop) crashes if prop is a PropertyGroup with nested PropertyGroup

the ID of a python ID property can be NULL.
This commit is contained in:
2012-04-11 08:37:48 +00:00
parent e5579ac505
commit 85908b498b
2 changed files with 4 additions and 3 deletions

View File

@@ -34,7 +34,7 @@ struct BPy_IDGroup_Iter;
typedef struct BPy_IDProperty {
PyObject_VAR_HEAD
struct ID *id;
struct ID *id; /* can be NULL */
struct IDProperty *prop; /* must be second member */
struct IDProperty *parent;
PyObject *data_wrap;
@@ -42,7 +42,7 @@ typedef struct BPy_IDProperty {
typedef struct BPy_IDArray {
PyObject_VAR_HEAD
struct ID *id;
struct ID *id; /* can be NULL */
struct IDProperty *prop; /* must be second member */
} BPy_IDArray;