added checks for valid pointers after locking

This commit is contained in:
Thomas Fischer 2013-06-30 17:51:38 +02:00
parent 95ef5ec226
commit 53abbe066d
13 changed files with 39 additions and 10 deletions

View file

@ -1505,7 +1505,8 @@ void WorldEditor::renderSplinePath(SimPath::Path *path)
GFXVertexBufferHandle<GFXVertexPC> vb;
vb.set(GFX, 3*batchSize, GFXBufferTypeVolatile);
vb.lock();
void *lockPtr = vb.lock();
if(!lockPtr) return;
U32 vIdx=0;
@ -1542,7 +1543,8 @@ void WorldEditor::renderSplinePath(SimPath::Path *path)
// Reset for next pass...
vIdx = 0;
vb.lock();
void *lockPtr = vb.lock();
if(!lockPtr) return;
}
}