summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}