diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-10-26 14:54:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-26 14:54:14 +0200 |
commit | f037eb7b0b81b30769c82784f790a60ca48438a6 (patch) | |
tree | b96699612a9919d6cc8dbef67c8e2b58e10fda69 | |
parent | ef9d3c0d8811b43b234499e2a6081a7923b42cb8 (diff) | |
parent | df0c8386a9fef3059d498ea61683448e388baa97 (diff) |
Merge pull request #33084 from Paulb23/33077_minimap_fold_crash
Fix text minimap crash when last line is folded
-rw-r--r-- | scene/gui/text_edit.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index a7e87a28ae..ae9c7c88d8 100644 --- a/scene/gui/text_edit.cpp +++ b/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; if (syntax_coloring) { color_map = _get_line_syntax_highlighting(minimap_line); |