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
|
|
@ -288,8 +288,12 @@ void RenderImposterMgr::_innerRender( const SceneRenderState *state, RenderPrePa
|
|||
smBatches++;
|
||||
|
||||
vb.set( GFX, stateCount*4, GFXBufferTypeVolatile );
|
||||
dMemcpy( vb.lock(), mBuffer, stateCount * 4 * sizeof( ImposterState ) );
|
||||
vb.unlock();
|
||||
ImposterState *buf = vb.lock();
|
||||
if(buf)
|
||||
{
|
||||
dMemcpy( buf, mBuffer, stateCount * 4 * sizeof( ImposterState ) );
|
||||
vb.unlock();
|
||||
}
|
||||
|
||||
//GFX->setVertexBuffer( mCornerVB, 0, stateCount * 4 );
|
||||
GFX->setVertexBuffer( vb );
|
||||
|
|
@ -327,8 +331,12 @@ void RenderImposterMgr::_innerRender( const SceneRenderState *state, RenderPrePa
|
|||
smBatches++;
|
||||
|
||||
vb.set( GFX, stateCount*4, GFXBufferTypeVolatile );
|
||||
dMemcpy( vb.lock(), mBuffer, stateCount * 4 * sizeof( ImposterState ) );
|
||||
vb.unlock();
|
||||
ImposterState *buf = vb.lock();
|
||||
if(buf)
|
||||
{
|
||||
dMemcpy( buf, mBuffer, stateCount * 4 * sizeof( ImposterState ) );
|
||||
vb.unlock();
|
||||
}
|
||||
|
||||
//GFX->setVertexBuffer( mCornerVB, 0, stateCount * 4 );
|
||||
GFX->setVertexBuffer( vb );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue