### Godot version

4.0 dev Beta 10

### System information

MacBook Pro M1 Max

### Issue description

After I imported font.ttf file and move it from one folder to another under ://res godot suddenly crashed, and it still crashes after restart.

### Steps to reproduce

Import some font.ttf file and try to move into different folder

### Minimal reproduction project

N/A
if (add_ellipsis && (ellipsis_pos > 0 || enforce_ellipsis)) {
			
			if (cut_per_word && (ellipsis_pos > 0)) {
				Glyph gl;
				gl.count = 1;
				gl.advance = whitespace_adv.x;
				gl.index = whitespace_gl_idx;
				gl.font_rid = whitespace_gl_font_rid;
				gl.font_size = last_gl_font_size;
				gl.flags = GRAPHEME_IS_SPACE | GRAPHEME_IS_BREAK_SOFT | GRAPHEME_IS_VIRTUAL | (is_rtl ? GRAPHEME_IS_RTL : 0);
				sd->overrun_trim_data.ellipsis_glyph_buf.append(gl);
			}
			
			if (dot_gl_idx != 0) {
				Glyph gl;
				gl.count = 1;
				gl.repeat = 3;
				gl.advance = dot_adv.x;
				gl.index = dot_gl_idx;
				gl.font_rid = dot_gl_font_rid;
				gl.font_size = last_gl_font_size;
				gl.flags = GRAPHEME_IS_PUNCTUATION | GRAPHEME_IS_VIRTUAL | (is_rtl ? GRAPHEME_IS_RTL : 0);
				sd->overrun_trim_data.ellipsis_glyph_buf.append(gl);
			}
		}
		sd->text_trimmed = true;
		sd->width_trimmed = width + ((ellipsis_pos != -1) ? ellipsis_width : 0);
	}
}
int64_t TextServerAdvanced::_shaped_text_get_trim_pos(const RID &p_shaped) const {