diff --git a/src/mesh/ItemValue.hpp b/src/mesh/ItemValue.hpp
index 1b6e10e25e75e0566c3d93dd2a81f53d2c5a8939..03f798fa273f9f1521e073cc738d9df6ffcd4f5a 100644
--- a/src/mesh/ItemValue.hpp
+++ b/src/mesh/ItemValue.hpp
@@ -82,19 +82,21 @@ class ItemValue
                    or not std::is_const<DataType2>()),
                   "Cannot assign  ItemValue of const to ItemValue of non-const");
 
-    if (not m_is_built) {
-      perr() << "Cannot assign array of values to a non-built ItemValue\n";
-      std::exit(1);
-    }
     if (m_values.size() != values.size()) {
       perr() << "Cannot assign an array of values of a different size\n";
       std::exit(1);
     }
 
-    m_values = values;
+    if (values.size() > 0) {
+      if (not m_is_built) {
+        perr() << "Cannot assign array of values to a non-built ItemValue\n";
+        std::exit(1);
+      }
 
-    return *this;
+      m_values = values;
+    }
 
+    return *this;
   }
 
   template <typename DataType2>