Merge pull request #424 from tdev/lock-checking

Added checks for valid pointers after locking
This commit is contained in:
SilentMike 2013-08-11 22:14:16 -07:00
commit 77bd934167
13 changed files with 39 additions and 10 deletions

View file

@ -1198,6 +1198,7 @@ void ProcessedShaderMaterial::setBuffers( GFXVertexBufferHandleBase *vertBuffer,
GFXVertexBufferDataHandle instVB;
instVB.set( GFX, instFormat->getSizeInBytes(), instFormat, instCount, GFXBufferTypeVolatile );
U8 *dest = instVB.lock();
if(!dest) return;
dMemcpy( dest, mInstancingState->getBuffer(), instFormat->getSizeInBytes() * instCount );
instVB.unlock();