bugfix [#23813] Memory leak when importing bvh

This is not specific to BVH Importer, any operator called from python which returned cancelled would have wouldn't free its report list.
This commit is contained in:
Campbell Barton
2010-09-20 04:59:20 +00:00
parent d88ba47eb9
commit ffd366e862

View File

@@ -838,8 +838,9 @@ int WM_operator_call_py(bContext *C, wmOperatorType *ot, int context, PointerRNA
retval= wm_operator_call_internal(C, ot, context, properties, reports);
/* keep the reports around if needed later */
if (retval & OPERATOR_RUNNING_MODAL || wm_operator_register_check(wm, ot))
{
if ( (retval & OPERATOR_RUNNING_MODAL) ||
((retval & OPERATOR_FINISHED) && wm_operator_register_check(wm, ot))
) {
reports->flag |= RPT_FREE; /* let blender manage freeing */
}