summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/lllocalcliprect.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/llui/lllocalcliprect.cpp b/indra/llui/lllocalcliprect.cpp
index f5a78e1099..43c21e250c 100644
--- a/indra/llui/lllocalcliprect.cpp
+++ b/indra/llui/lllocalcliprect.cpp
@@ -77,8 +77,6 @@ LLScreenClipRect::LLScreenClipRect(const LLRect& rect, BOOL enabled)
LLScreenClipRect::~LLScreenClipRect()
{
- // finish any deferred calls in this clipping region
- gGL.flush();
if (mEnabled)
{
popClipRect();
@@ -115,6 +113,9 @@ void LLScreenClipRect::updateScissorRegion()
{
if (sClipRectStack.empty()) return;
+ // finish any deferred calls in the old clipping region
+ gGL.flush();
+
LLRect rect = sClipRectStack.top();
stop_glerror();
S32 x,y,w,h;