diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index 6594bba65e8..a64bfd676c1 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -5644,6 +5644,8 @@ struct EditorSceneImporterGLTFInterpolate { template T GLTFDocument::_interpolate_track(const Vector &p_times, const Vector &p_values, const float p_time, const GLTFAnimation::Interpolation p_interp) { + ERR_FAIL_COND_V(!p_values.size(), T()); + ERR_FAIL_COND_V(p_times.size() != p_values.size(), p_values[0]); //could use binary search, worth it? int idx = -1; for (int i = 0; i < p_times.size(); i++) {