From aece85f02af2483da25d5c8d729fbe383858e590 Mon Sep 17 00:00:00 2001 From: Thomas Fischer Date: Mon, 15 Apr 2013 18:54:34 +0200 Subject: [PATCH] added missing initialization and set pointer to NULL after deletion --- Engine/source/T3D/fx/particleEmitter.cpp | 1 + Engine/source/T3D/shapeBase.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/Engine/source/T3D/fx/particleEmitter.cpp b/Engine/source/T3D/fx/particleEmitter.cpp index bab62dba8..04429d8fa 100644 --- a/Engine/source/T3D/fx/particleEmitter.cpp +++ b/Engine/source/T3D/fx/particleEmitter.cpp @@ -726,6 +726,7 @@ ParticleEmitter::ParticleEmitter() mCurBuffSize = 0; mDead = false; + mDataBlock = NULL; // ParticleEmitter should be allocated on the client only. mNetFlags.set( IsGhost ); diff --git a/Engine/source/T3D/shapeBase.cpp b/Engine/source/T3D/shapeBase.cpp index 350809286..10abf850d 100644 --- a/Engine/source/T3D/shapeBase.cpp +++ b/Engine/source/T3D/shapeBase.cpp @@ -958,6 +958,7 @@ ShapeBase::~ShapeBase() if( mShapeInstance && (mShapeInstance->getDebrisRefCount() == 0) ) { delete mShapeInstance; + mShapeInstance = NULL; } CollisionTimeout* ptr = mTimeoutList;