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
|
|
@ -400,6 +400,7 @@ void SkyBox::_initRender()
|
|||
}
|
||||
|
||||
GFXVertexPNTT *vertPtr = mVB.lock();
|
||||
if(!vertPtr) return;
|
||||
|
||||
dMemcpy( vertPtr, tmpVerts, sizeof ( GFXVertexPNTT ) * vertCount );
|
||||
|
||||
|
|
@ -412,6 +413,7 @@ void SkyBox::_initRender()
|
|||
mFogBandVB.set( GFX, 48, GFXBufferTypeStatic );
|
||||
|
||||
GFXVertexPC *bandVertPtr = mFogBandVB.lock();
|
||||
if(!bandVertPtr) return;
|
||||
|
||||
// Grab the fog color.
|
||||
ColorI fogColor( mLastFogColor.red * 255, mLastFogColor.green * 255, mLastFogColor.blue * 255 );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue