Fix Segfault in MPI ReceiveMesh

See https://github.com/NGSolve/netgen/issues/196
This commit is contained in:
Matthias Hochsteger 2024-11-25 13:56:31 +01:00
parent 9e80e5f195
commit 44611e668c

View File

@ -1204,7 +1204,7 @@ namespace netgen
auto write_names = [&] (auto & array) {
for (int k = 0; k < array.Size(); k++) {
int s = name_sizes[tot_nn];
array[k] = new string(&compiled_names[tot_size], s);
array[k] = s ? new string(&compiled_names[tot_size], s) : nullptr;
tot_nn++;
tot_size += s;
}