diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-03-27 10:56:37 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-03-27 10:56:37 +0400 |
commit | 587bbc4213078fab34ebb631c7eb3cdabe61bc3b (patch) | |
tree | 4eb89976ba5452aaf2fb38dfab88ba4a6715d504 /source | |
parent | 9b19c564ef9e41f8892b0174196cb0e41e9d2d30 (diff) |
fix [#26616] Line of code make Blender crash
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index a8c504e775b..ecf66ca4700 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -3861,11 +3861,11 @@ static PyObject *pyrna_struct_new(PyTypeObject *type, PyObject *args, PyObject * { if(PyTuple_GET_SIZE(args) == 1) { BPy_StructRNA *base= (BPy_StructRNA *)PyTuple_GET_ITEM(args, 0); - if (type == Py_TYPE(base)) { + if (Py_TYPE(base) == type) { Py_INCREF(base); return (PyObject *)base; } - else if (PyType_IsSubtype(type, &pyrna_struct_Type)) { + else if (PyType_IsSubtype(Py_TYPE(base), &pyrna_struct_Type)) { /* this almost never runs, only when using user defined subclasses of built-in object. * this isnt common since its NOT related to registerable subclasses. eg: |