diff options
author | Paweł Fertyk <pfertyk@pfertyk.me> | 2022-05-12 00:15:37 +0200 |
---|---|---|
committer | Paweł Fertyk <pfertyk@pfertyk.me> | 2022-05-16 18:46:01 +0200 |
commit | 3d5dd91f22d629b8dee6332936a3f9d939ab8d03 (patch) | |
tree | 229c7008e8fea12f025e863d84d7eed15e9e25fd /scene/gui/text_edit.cpp | |
parent | 9c746b32131d79d85fe05a09db7d8f2f229c3362 (diff) |
Fix get_breakpointed_lines crashing Godot
Fixes #60668.
Diffstat (limited to 'scene/gui/text_edit.cpp')
-rw-r--r-- | scene/gui/text_edit.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index d7a07454de..5f7c2e1804 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -4711,9 +4711,7 @@ void TextEdit::add_gutter(int p_at) { gutters.insert(p_at, GutterInfo()); } - for (int i = 0; i < text.size() + 1; i++) { - text.add_gutter(p_at); - } + text.add_gutter(p_at); emit_signal(SNAME("gutter_added")); update(); } @@ -4723,9 +4721,7 @@ void TextEdit::remove_gutter(int p_gutter) { gutters.remove_at(p_gutter); - for (int i = 0; i < text.size() + 1; i++) { - text.remove_gutter(p_gutter); - } + text.remove_gutter(p_gutter); emit_signal(SNAME("gutter_removed")); update(); } |