mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
added checks for valid pointers after locking
This commit is contained in:
parent
95ef5ec226
commit
53abbe066d
13 changed files with 39 additions and 10 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue