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

@ -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;