2
0
Эх сурвалжийг харах

Fix text minimap crash when last line is folded

Paulb23 6 жил өмнө
parent
commit
df0c8386a9

+ 4 - 0
scene/gui/text_edit.cpp

@@ -958,6 +958,10 @@ void TextEdit::_notification(int p_what) {
 						}
 						}
 					}
 					}
 
 
+					if (minimap_line < 0 || minimap_line >= (int)text.size()) {
+						break;
+					}
+
 					Map<int, HighlighterInfo> color_map;
 					Map<int, HighlighterInfo> color_map;
 					if (syntax_coloring) {
 					if (syntax_coloring) {
 						color_map = _get_line_syntax_highlighting(minimap_line);
 						color_map = _get_line_syntax_highlighting(minimap_line);