Salome HOME
Simple fix for 40160 [CEA] No name in SHAPER
[modules/shaper.git] / src / Model / Model_AttributeTables.cpp
index b5bf6d096ea4e624a4ca5c02e300faa5d92507fe..1ce1a702b687cb06aec037ce8d6e4e330721051c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2024  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -110,7 +110,8 @@ void Model_AttributeTables::setSize(const int theRows, const int theColumns, con
       for(int aTable = 0; aTable < theTables; aTable++) {
         for(int aColumn = 0; aColumn < theColumns; aColumn++) {
           for(int aRow = 0; aRow < theRows; aRow++) {
-            int anOldIndex, anIndex = aTable * theRows * theColumns + aRow * theColumns + aColumn;
+            int anOldIndex = 0;
+            int anIndex = aTable * theRows * theColumns + aRow * theColumns + aColumn;
             bool aRestore = aTable < myTables && aColumn < myCols && aRow < myRows;
             if (aRestore)
               anOldIndex = aTable * myRows * myCols + aRow * myCols + aColumn;