Commit 07792e54 by benvanik@google.com

Fix for issue 150 - HandleAllocator asserts on framebuffer 0 release

Issue=150 Signed-off-by: apatrick git-svn-id: https://angleproject.googlecode.com/svn/trunk@633 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 192a1810
#define MAJOR_VERSION 0 #define MAJOR_VERSION 0
#define MINOR_VERSION 0 #define MINOR_VERSION 0
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 632 #define BUILD_REVISION 633
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -44,11 +44,20 @@ void HandleAllocator::release(GLuint handle) ...@@ -44,11 +44,20 @@ void HandleAllocator::release(GLuint handle)
{ {
if (handle == mNextValue - 1) if (handle == mNextValue - 1)
{ {
ASSERT(mBaseValue < mNextValue); // Don't drop below base value
mNextValue--; if(mNextValue > mBaseValue)
return; {
mNextValue--;
}
}
else
{
// Only free handles that we own - don't drop below the base value
if (handle >= mBaseValue)
{
mFreeValues.push_back(handle);
}
} }
mFreeValues.push_back(handle);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment