diff options
author | Martin Poirier <theeth@yahoo.com> | 2009-11-10 02:33:56 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2009-11-10 02:33:56 +0300 |
commit | d34261edab6e6d0c428af96874e9846528c45339 (patch) | |
tree | 5ba207baaebbd88a333863b440ef43567ada1ab3 /source | |
parent | 60ea7456137a019c2ddad75f14b3b6a0892f7b56 (diff) |
Don't free Context from python.
There might be a better way to do this, Cambo, please check.
This solves the Totblock == -1 error
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 15c1f378cb1..bcc12eb4502 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -320,8 +320,11 @@ static void pyrna_struct_dealloc( BPy_StructRNA * self ) { if (self->freeptr && self->ptr.data) { IDP_FreeProperty(self->ptr.data); - MEM_freeN(self->ptr.data); - self->ptr.data= NULL; + if (self->ptr.type != &RNA_Context) + { + MEM_freeN(self->ptr.data); + self->ptr.data= NULL; + } } /* Note, for subclassed PyObjects we cant just call PyObject_DEL() directly or it will crash */ |