diff options
author | Dave Parks <davep@lindenlab.com> | 2012-05-22 00:49:07 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-05-22 00:49:07 -0500 |
commit | 534168c452c10b1616b883e63321edd1ccd96fb2 (patch) | |
tree | a61818a9f38b1e4467a8dc3434f725192495a73b /indra/llrender/llvertexbuffer.cpp | |
parent | b9606f57c32dc021fd967a40aebc1d2a44bea0bd (diff) |
MAINT-616 Fix for crash on shutdown caused by previous changes.
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
-rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 6a218e7734..0e037fdd21 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -142,16 +142,19 @@ U32 LLVBOPool::genBuffer() void LLVBOPool::deleteBuffer(U32 name) { - LLVertexBuffer::unbind(); + if (gGLManager.mInited) + { + LLVertexBuffer::unbind(); - glBindBufferARB(mType, name); - glBufferDataARB(mType, 0, NULL, mUsage); + glBindBufferARB(mType, name); + glBufferDataARB(mType, 0, NULL, mUsage); - llassert(std::find(mGLNamePool.begin(), mGLNamePool.end(), name) == mGLNamePool.end()); + llassert(std::find(mGLNamePool.begin(), mGLNamePool.end(), name) == mGLNamePool.end()); - mGLNamePool.push_back(name); + mGLNamePool.push_back(name); - LLVertexBuffer::unbind(); + LLVertexBuffer::unbind(); + } } |