Fix the underlying problem from the last commit, which was worked

around incorrectly in r24435 before that. freeptr in BPy_StructRNA
was uninitialized when creating bpy.context.
This commit is contained in:
2010-01-29 14:49:21 +00:00
parent 5abb38e566
commit e28e6ac5c7
2 changed files with 5 additions and 7 deletions

View File

@@ -370,13 +370,9 @@ static long pyrna_struct_hash( BPy_StructRNA *self )
static void pyrna_struct_dealloc( BPy_StructRNA *self )
{
if (self->freeptr && self->ptr.data) {
if (self->ptr.type != &RNA_Context)
{
IDP_FreeProperty(self->ptr.data);
MEM_freeN(self->ptr.data);
self->ptr.data= NULL;
}
IDP_FreeProperty(self->ptr.data);
MEM_freeN(self->ptr.data);
self->ptr.data= NULL;
}
/* Note, for subclassed PyObjects we cant just call PyObject_DEL() directly or it will crash */