mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
crashfix: make sure mShapeInstance is always assigned valid or NULL
there were a couple code routes that could lead to mShapeInstance holding on to the old ram loc. used SAFE_DELETE preemptively to ensure that never happens.
This commit is contained in:
parent
280866724d
commit
17d2765592
1 changed files with 1 additions and 1 deletions
|
|
@ -471,7 +471,7 @@ void SpawnSphere::unpackUpdate(NetConnection * con, BitStream * stream)
|
||||||
stream->read(&mSpawnDataBlock);
|
stream->read(&mSpawnDataBlock);
|
||||||
if (oldSDB != mSpawnDataBlock)
|
if (oldSDB != mSpawnDataBlock)
|
||||||
{
|
{
|
||||||
delete mShapeInstance;
|
SAFE_DELETE(mShapeInstance);
|
||||||
ShapeBaseData *spawnedDatablock = dynamic_cast<ShapeBaseData *>(Sim::findObject(mSpawnDataBlock.c_str()));
|
ShapeBaseData *spawnedDatablock = dynamic_cast<ShapeBaseData *>(Sim::findObject(mSpawnDataBlock.c_str()));
|
||||||
if (spawnedDatablock)
|
if (spawnedDatablock)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue