Browse Source

Merge pull request #1660 from Azaezel/knockOffKnotNetleak

suppresses a leak potentially caused by Knot::mType||Knot::mPath entr…
Areloch 9 years ago
parent
commit
387e28a1e0
2 changed files with 11 additions and 1 deletions
  1. 10 0
      Engine/source/T3D/cameraSpline.cpp
  2. 1 1
      Engine/source/T3D/cameraSpline.h

+ 10 - 0
Engine/source/T3D/cameraSpline.cpp

@@ -29,6 +29,16 @@
 
 //-----------------------------------------------------------------------------
 
+CameraSpline::Knot::Knot()
+{
+   mPosition = Point3F::Zero;
+   mRotation = QuatF::Identity;
+   mSpeed = 0.0f;
+   mType = NORMAL;
+   mPath = SPLINE;
+   prev = NULL; next = NULL;
+};
+
 CameraSpline::Knot::Knot(const Knot &k)
 {
    mPosition = k.mPosition;

+ 1 - 1
Engine/source/T3D/cameraSpline.h

@@ -54,7 +54,7 @@ public:
       Knot *prev;
       Knot *next;
 
-      Knot() {};
+      Knot();
       Knot(const Knot &k);
       Knot(const Point3F &p, const QuatF &r, F32 s, Knot::Type type = NORMAL, Knot::Path path = SPLINE);
    };