mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 19:53: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
|
|
@ -1254,6 +1254,7 @@ void TSSkinMesh::updateSkin( const Vector<MatrixF> &transforms, TSVertexBufferHa
|
|||
|
||||
// Lock, and skin directly into the final memory destination
|
||||
outPtr = (U8 *)instanceVB.lock();
|
||||
if(!outPtr) return;
|
||||
#endif
|
||||
// Set position/normal to zero so we can accumulate
|
||||
zero_vert_normal_bulk(mNumVerts, outPtr, outStride);
|
||||
|
|
@ -2379,6 +2380,7 @@ void TSMesh::_createVBIB( TSVertexBufferHandle &vb, GFXPrimitiveBufferHandle &pb
|
|||
|
||||
// Copy from aligned memory right into GPU memory
|
||||
U8 *vertData = (U8*)vb.lock();
|
||||
if(!vertData) return;
|
||||
#if defined(TORQUE_OS_XENON)
|
||||
XMemCpyStreaming_WriteCombined( vertData, mVertexData.address(), mVertexData.mem_size() );
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue