MultiMesh: Fix potential crash found by fuzzing

Fixes #58293.
This commit is contained in:
Rémi Verschelde 2022-04-25 16:55:33 +02:00
parent 4fc1a57295
commit 24307bd074

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();