summaryrefslogtreecommitdiff
path: root/indra/llrender/llrendertarget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llrendertarget.cpp')
-rw-r--r--indra/llrender/llrendertarget.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index 629664b76d..88c48e5166 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -388,14 +388,14 @@ void LLRenderTarget::release()
glBindFramebuffer(GL_FRAMEBUFFER, sCurFBO);
}
- if (mFBO == sCurFBO)
- {
- sCurFBO = 0;
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
- }
-
if (mFBO)
{
+ if (mFBO == sCurFBO)
+ {
+ sCurFBO = 0;
+ glBindFramebuffer(GL_FRAMEBUFFER, 0);
+ }
+
glDeleteFramebuffers(1, (GLuint *) &mFBO);
mFBO = 0;
}