### 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
ERR_FAIL_COND(!parent_sd->valid);
		spans = parent_sd->spans;
	}
	if (spans.size() == 0) {
		return;
	}
	int sd_size = sd->glyphs.size();
	int last_gl_font_size = sd_glyphs[sd_size - 1].font_size;
	
	RID dot_gl_font_rid = sd_glyphs[sd_size - 1].font_rid;
	if (!_font_has_char(dot_gl_font_rid, '.')) {
		const Array &fonts = spans[spans.size() - 1].fonts;
		for (int i = 0; i < fonts.size(); i++) {
			if (_font_has_char(fonts[i], '.')) {
				dot_gl_font_rid = fonts[i];
				break;
			}
		}
	}
	RID whitespace_gl_font_rid = sd_glyphs[sd_size - 1].font_rid;
	if (!_font_has_char(whitespace_gl_font_rid, '.')) {
		const Array &fonts = spans[spans.size() - 1].fonts;
		for (int i = 0; i < fonts.size(); i++) {
			if (_font_has_char(fonts[i], ' ')) {
				whitespace_gl_font_rid = fonts[i];
				break;
			}
		}
	}
	int32_t dot_gl_idx = dot_gl_font_rid.is_valid() ? _font_get_glyph_index(dot_gl_font_rid, last_gl_font_size, '.', 0) : -10;