summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/TextEditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibGUI/TextEditor.cpp')
-rw-r--r--Libraries/LibGUI/TextEditor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Libraries/LibGUI/TextEditor.cpp b/Libraries/LibGUI/TextEditor.cpp
index fa501d3f95..6ee66b43f5 100644
--- a/Libraries/LibGUI/TextEditor.cpp
+++ b/Libraries/LibGUI/TextEditor.cpp
@@ -559,7 +559,8 @@ void TextEditor::move_selected_lines_down()
get_selection_line_boundaries(first_line, last_line);
auto& lines = document().lines();
- if (last_line >= (size_t)(lines.size() - 1))
+ ASSERT(lines.size() != 0);
+ if (last_line >= lines.size() - 1)
return;
lines.insert((int)first_line, lines.take((int)last_line + 1));