Fix #121751: Free CurvesTransformData on no selection

A `CurvesTransformData` is created to store transform points, but it's
not deleted when there's nothing selected, causing memory leak. Now
fixed.

Pull Request: https://projects.blender.org/blender/blender/pulls/121767
This commit is contained in:
YimingWu
2024-05-14 17:43:42 +02:00
committed by YimingWu
parent 956eb9a034
commit 9512daee2d

View File

@@ -177,6 +177,9 @@ static void createTransCurvesVerts(bContext * /*C*/, TransInfo *t)
tc.data = MEM_cnew_array<TransData>(tc.data_len, __func__);
curves_transform_data->positions.reinitialize(tc.data_len);
}
else {
tc.custom.type.free_cb(t, &tc, &tc.custom.type);
}
}
/* Populate TransData structs. */