summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbase.cpp
diff options
context:
space:
mode:
authorMonroe Linden <monroe@lindenlab.com>2010-03-10 14:32:40 -0800
committerMonroe Linden <monroe@lindenlab.com>2010-03-10 14:32:40 -0800
commit347585cf975afac59ec6b9960e093acd015627f5 (patch)
tree12317b26af0327db953257940fc5cda790fed999 /indra/llui/lltextbase.cpp
parentaa65ce52bed7a161127f9f93330079d410ebbb94 (diff)
Fix for EXT-6276.
Added a check in LLTextBase::drawSelectionBackground() to keep it from sending degenerate rectangles to gl_rect_2d(). This seems to be what was causing the GL state to go bad. Reviewed by Richard at http://codereview.lindenlab.com/534001
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rw-r--r--indra/llui/lltextbase.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 851fb966ec..48aa406901 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -396,8 +396,13 @@ void LLTextBase::drawSelectionBackground()
++rect_it)
{
LLRect selection_rect = *rect_it;
- selection_rect.translate(mVisibleTextRect.mLeft - content_display_rect.mLeft, mVisibleTextRect.mBottom - content_display_rect.mBottom);
- gl_rect_2d(selection_rect, selection_color);
+ // Don't send empty rects to gl_rect_2d.
+ // Drawing degenerate rectangles seems to cause https://jira.secondlife.com/browse/EXT-6276 .
+ if(selection_rect.notEmpty())
+ {
+ selection_rect.translate(mVisibleTextRect.mLeft - content_display_rect.mLeft, mVisibleTextRect.mBottom - content_display_rect.mBottom);
+ gl_rect_2d(selection_rect, selection_color);
+ }
}
}
}