mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-28 02:53:49 +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
|
|
@ -219,8 +219,12 @@ void TerrainBlock::_updateBaseTexture( bool writeToCache )
|
|||
points[3].texCoord = Point2F( 1.0, needsYFlip ? 0.0f : 1.0f );
|
||||
|
||||
vb.set( GFX, 4, GFXBufferTypeVolatile );
|
||||
dMemcpy( vb.lock(), points, sizeof(GFXVertexPT) * 4 );
|
||||
vb.unlock();
|
||||
GFXVertexPT *ptr = vb.lock();
|
||||
if(ptr)
|
||||
{
|
||||
dMemcpy( ptr, points, sizeof(GFXVertexPT) * 4 );
|
||||
vb.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
GFXTexHandle blendTex;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue