fix for python refcounting leak, RNA_path_resolve_full now unsets the index if its not last.

This commit is contained in:
2010-09-24 03:24:15 +00:00
parent 05f8e53d33
commit 5c99f3886e
2 changed files with 4 additions and 0 deletions

View File

@@ -3027,6 +3027,7 @@ int RNA_path_resolve_full(PointerRNA *ptr, const char *path, PointerRNA *r_ptr,
if(nextptr.data) {
curptr= nextptr;
prop= NULL; /* now we have a PointerRNA, the prop is our parent so forget it */
*index= -1;
}
else
return 0;
@@ -3069,6 +3070,7 @@ int RNA_path_resolve_full(PointerRNA *ptr, const char *path, PointerRNA *r_ptr,
if(nextptr.data) {
curptr= nextptr;
prop= NULL; /* now we have a PointerRNA, the prop is our parent so forget it */
*index= -1;
}
else
return 0;

View File

@@ -1140,6 +1140,8 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, ParameterList *p
Py_XDECREF(value_new); return -1;
}
}
Py_XDECREF(value_new);
break;
}