### Godot version

4.0.dev (c309de53997feff3286295fb2d71657f112a15db)

### System information

Linux, Nvidia, Vulkan

### Issue description

Editor segfaults when certain conditions are met when using the AnimationPlayer editor.

### Steps to reproduce

1. Create multiple animations, saved into a animation collection
2. Open an existing animation, then make a new empty animation
3. Change from seconds to fps, or add a new property to animate ()
4. Editor crashes

NOTE: It is slightly random and I have not found a perfect repro

### Minimal reproduction project

N/A (TBD?)
}
		} break;
		case Animation::TYPE_ANIMATION: {
			if (name == "animation") {
				r_ret = animation->animation_track_get_key_animation(track, key);
				return true;
			}
		} break;
	}
	return false;
}
void AnimationTrackKeyEdit::_get_property_list(List<PropertyInfo> *p_list) const {
	if (animation.is_null()) {
		return;
	}
	ERR_FAIL_INDEX(track, animation->get_track_count());
	int key = animation->track_find_key(track, key_ofs, Animation::FIND_MODE_APPROX);
	ERR_FAIL_COND(key == -1);
	switch (animation->track_get_type(track)) {
		case Animation::TYPE_POSITION_3D: {
			p_list->push_back(PropertyInfo(Variant::VECTOR3, PNAME("position")));
		} break;
		case Animation::TYPE_ROTATION_3D: {
			p_list->push_back(PropertyInfo(Variant::QUATERNION, PNAME("rotation")));
		} break;
		case Animation::TYPE_SCALE_3D: {
			p_list->push_back(PropertyInfo(Variant::VECTOR3, PNAME("scale")));
		} break;
		case Animation::TYPE_BLEND_SHAPE: {
			p_list->push_back(PropertyInfo(Variant::FLOAT, PNAME("value")));