diff options
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 */ |