From 620578b1a0b40e8f037ae4d25ae6842a528cb9f2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Jun 30 2016 04:37:43 +0000 Subject: Fix missing array specifier from delete --- diff --git a/toonz/sources/common/tvectorimage/tstroke.cpp b/toonz/sources/common/tvectorimage/tstroke.cpp index fda300f..8ef6051 100644 --- a/toonz/sources/common/tvectorimage/tstroke.cpp +++ b/toonz/sources/common/tvectorimage/tstroke.cpp @@ -3116,8 +3116,8 @@ double *reparameterize3D(const TThickCubic &cubic, for (int i = 0; i < size; i++) { uPrime[i] = NewtonRaphsonRootFind3D(cubic, *(pointsArrayBegin + i), u[i]); if (!_finite(uPrime[i])) { - delete uPrime; - return 0; + delete[] uPrime; + return NULL; } } @@ -3125,8 +3125,8 @@ double *reparameterize3D(const TThickCubic &cubic, // std::sort( uPrime, uPrime+size ); if (uPrime[0] < 0.0 || uPrime[size - 1] > 1.0) { - delete uPrime; - return 0; + delete[] uPrime; + return NULL; } assert(uPrime[0] >= 0.0);