From df0c8386a9fef3059d498ea61683448e388baa97 Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Sat, 26 Oct 2019 13:37:25 +0100 Subject: Fix text minimap crash when last line is folded --- scene/gui/text_edit.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 color_map; if (syntax_coloring) { color_map = _get_line_syntax_highlighting(minimap_line); -- cgit v1.2.3