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:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user