0025361: Sample "Voxel" crashes during "Demo - Collisions" demonstration
authorvro <vro@opencascade.com>
Tue, 14 Oct 2014 04:28:47 +0000 (08:28 +0400)
committerbugmaster <bugmaster@opencascade.com>
Thu, 23 Oct 2014 12:26:59 +0000 (16:26 +0400)
Deletion of an array was incorrect.

src/Voxel/Voxel_CollisionDetection.cxx

index 884bb76..bb974b3 100644 (file)
@@ -271,7 +271,7 @@ void Voxel_CollisionDetection::Clear()
 {
   if (myVoxels)
   {
-    delete ((Voxel_BoolDS*)myVoxels);
+    delete[] ((Voxel_BoolDS*)myVoxels);
     myVoxels = 0;
   }
 }