Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Fix missing array specifier from delete

Campbell Barton620578b1a0b4
diff --git a/toonz/sources/common/tvectorimage/tstroke.cpp b/toonz/sources/common/tvectorimage/tstroke.cpp
index fda300f9b..8ef60513e 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);