- missing a decref for new pytypes
[blender.git] / source / blender / python / intern / bpy_rna.c
index 0edd5e8dbff31c9ee11454e65ac67245278b307a..0c03b439e78fc9d0b5f03dde4687749961dab5bd 100644 (file)
@@ -2371,6 +2371,7 @@ PyObject *pyrna_struct_CreatePyObject( PointerRNA *ptr )
                
                if (tp) {
                        pyrna = (BPy_StructRNA *) tp->tp_alloc(tp, 0);
+                       Py_DECREF(tp);
                }
                else {
                        fprintf(stderr, "Could not make type\n");