### Godot version

4.1.beta1

### System information

macOS 13.3.1 mobile renderer

### Issue description

Trying to open and edit one of my visual shaders now consistently crashes Godot 4.1beta1. 

The shader was made and edited fine in earlier versions of Godot 4 and I'm not certain what is special with this shader (attached below for investigation). Opening and editing other visual shaders works fine for me. The only thing I can think of that this shader uses that other do not is the gradient node, though as I can't open it I'm not sure what else might be going on in it.

### Steps to reproduce

Open the attached visual shader (in any project)

### Minimal reproduction project

[ConnectBlendShader.tres.zip](https://www.lostminds.com/godot/ConnectBlendShader.tres.zip)
queue_redraw();
	
	if (selected_index >= curve->get_point_count()) {
		set_selected_index(-1);
	}
}
int CurveEdit::get_point_at(Vector2 p_pos) const {
	if (curve.is_null()) {
		return -1;
	}
	
	const Rect2 hover_rect = Rect2(p_pos, Vector2(0, 0)).grow(hover_radius);
	int closest_idx = -1;
	float closest_dist_squared = hover_radius * hover_radius * 2;
	for (int i = 0; i < curve->get_point_count(); ++i) {
		Vector2 p = get_view_pos(curve->get_point_position(i));
		if (hover_rect.has_point(p) && p.distance_squared_to(p_pos) < closest_dist_squared) {
			closest_dist_squared = p.distance_squared_to(p_pos);
			closest_idx = i;
		}
	}
	return closest_idx;
}
CurveEdit::TangentIndex CurveEdit::get_tangent_at(Vector2 p_pos) const {