Merge pull request #60514 from akien-mga/3.x-fix-multimesh-fuzzying-crash

MultiMesh: Fix potential crash found by fuzzing
This commit is contained in:
Rémi Verschelde 2022-04-25 19:03:48 +02:00 committed by GitHub
commit 8d8a512712
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -463,7 +463,7 @@ void RasterizerStorage::multimesh_set_physics_interpolation_quality(RID p_multim
void RasterizerStorage::multimesh_instance_reset_physics_interpolation(RID p_multimesh, int p_index) {
MMInterpolator *mmi = _multimesh_get_interpolator(p_multimesh);
if (mmi) {
ERR_FAIL_COND(p_index >= mmi->_num_instances);
ERR_FAIL_INDEX(p_index, mmi->_num_instances);
PoolVector<float>::Write w = mmi->_data_prev.write();
PoolVector<float>::Read r = mmi->_data_curr.read();