[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49117] trunk/blender/source/blender/ compositor/operations: fix for more new[]/delete[] mismatches

Campbell Barton ideasman42 at gmail.com
Sun Jul 22 17:31:13 CEST 2012


Revision: 49117
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49117
Author:   campbellbarton
Date:     2012-07-22 15:31:12 +0000 (Sun, 22 Jul 2012)
Log Message:
-----------
fix for more new[]/delete[] mismatches

Modified Paths:
--------------
    trunk/blender/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
    trunk/blender/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
    trunk/blender/source/blender/compositor/operations/COM_VectorBlurOperation.cpp

Modified: trunk/blender/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_DilateErodeOperation.cpp	2012-07-22 15:15:39 UTC (rev 49116)
+++ trunk/blender/source/blender/compositor/operations/COM_DilateErodeOperation.cpp	2012-07-22 15:31:12 UTC (rev 49117)
@@ -384,7 +384,7 @@
 	this->m_inputProgram = NULL;
 	this->deinitMutex();
 	if (this->m_cached_buffer) {
-		delete this->m_cached_buffer;
+		delete [] this->m_cached_buffer;
 		this->m_cached_buffer = NULL;
 	}
 }

Modified: trunk/blender/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp	2012-07-22 15:15:39 UTC (rev 49116)
+++ trunk/blender/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp	2012-07-22 15:31:12 UTC (rev 49117)
@@ -1273,8 +1273,8 @@
 		float *imask = innerMask->convertToValueBuffer();
 		float *omask = outerMask->convertToValueBuffer();
 		doDoubleEdgeMask(imask, omask, data);
-		delete imask;
-		delete omask;
+		delete [] imask;
+		delete [] omask;
 		this->m_cachedInstance = data;
 	}
 	unlockMutex();
@@ -1282,12 +1282,9 @@
 }
 void DoubleEdgeMaskOperation::executePixel(float *color, int x, int y, void *data)
 {
-	float *buffer = (float *) data;
+	float *buffer = (float *)data;
 	int index = (y * this->getWidth() + x);
-	color[0] = buffer[index];
-	color[1] = buffer[index + 1];
-	color[2] = buffer[index + 2];
-	color[3] = buffer[index + 3];
+	copy_v4_v4(color, buffer + index);
 }
 
 void DoubleEdgeMaskOperation::deinitExecution()

Modified: trunk/blender/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_VectorBlurOperation.cpp	2012-07-22 15:15:39 UTC (rev 49116)
+++ trunk/blender/source/blender/compositor/operations/COM_VectorBlurOperation.cpp	2012-07-22 15:31:12 UTC (rev 49117)
@@ -115,6 +115,6 @@
 	blurdata.curved = this->m_settings->curved;
 	blurdata.fac = this->m_settings->fac;
 	RE_zbuf_accumulate_vecblur(&blurdata, this->getWidth(), this->getHeight(), data, inputImage->getBuffer(), inputSpeed->getBuffer(), zbuf);
-	delete zbuf;
+	delete [] zbuf;
 	return;
 }




More information about the Bf-blender-cvs mailing list