aboutsummaryrefslogtreecommitdiff
path: root/dw/textblock.cc
diff options
context:
space:
mode:
Diffstat (limited to 'dw/textblock.cc')
-rw-r--r--dw/textblock.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc
index 20c114fa..f5308d8c 100644
--- a/dw/textblock.cc
+++ b/dw/textblock.cc
@@ -2765,7 +2765,7 @@ core::Widget *Textblock::getWidgetAtPointLevel (int x, int y,
int lineIndex = findLineIndexWhenAllocated (y - allocation.y);
- if (lineIndex >= 0 || lineIndex < lines->size ()) {
+ if (lineIndex >= 0 && lineIndex < lines->size ()) {
Line *line = lines->getRef (lineIndex);
if (osi->index > line->lastWord)
osi->index = line->lastWord;