BKE_deform: assert on invalid arguments to BKE_defvert_remove_group
This commit is contained in:
@@ -838,6 +838,8 @@ void BKE_defvert_remove_group(MDeformVert *dvert, MDeformWeight *dw)
|
||||
}
|
||||
/* Ensure `dw` is part of `dvert` (security check). */
|
||||
if (UNLIKELY(uintptr_t(dw - dvert->dw) < uintptr_t(dvert->totweight))) {
|
||||
/* Assert as an invalid `dw` (while supported) isn't likely to do what the caller expected. */
|
||||
BLI_assert_unreachable();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user