diff options
author | Paulb23 <p_batty@hotmail.co.uk> | 2019-10-26 13:37:25 +0100 |
---|---|---|
committer | Paulb23 <p_batty@hotmail.co.uk> | 2019-10-26 13:37:25 +0100 |
commit | df0c8386a9fef3059d498ea61683448e388baa97 (patch) | |
tree | 3f4cd5eced738d58b33f0f38eae0f37cb716505d /scene | |
parent | a8e007f055c69483c77945739f2c3218de5e5c44 (diff) |
Fix text minimap crash when last line is folded
Diffstat (limited to 'scene')
-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); |