changeset 27780:f47bb02c8d06

maint: merge stable to default
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 05 Dec 2019 21:21:51 +0100
parents 54767f6a93f5 (current diff) 088d5e7a2b7e (diff)
children 881efe2c4c0f
files libinterp/corefcn/graphics.cc
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.cc	Wed Dec 04 12:02:13 2019 -0800
+++ b/libinterp/corefcn/graphics.cc	Thu Dec 05 21:21:51 2019 +0100
@@ -10122,7 +10122,8 @@
         }
 
       // Second step: assign normals to the respective vertices
-      std::vector<RowVector> vec_vn [num_v];  // list of normals for vertices
+      // list of normals for vertices
+      std::vector<RowVector> *vec_vn = new std::vector<RowVector> [num_v];
       for (octave_idx_type i = 0; i < num_f; i++)
         {
           // get number of corners
@@ -10177,6 +10178,8 @@
             }
         }
 
+      delete[] vec_vn;
+
       vertexnormals = vn;
     }
   else if (reset)