diff options
-rw-r--r-- | src/Boundary.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/Boundary.c b/src/Boundary.c index 84c2f54..99ec619 100644 --- a/src/Boundary.c +++ b/src/Boundary.c @@ -831,12 +831,22 @@ CCTK_INT Bdry_Boundary_SelectedGVs(CCTK_POINTER GH, printf(" current->next is %p\n",current->next); #endif - /* One should be able to pass NULL to ignore the values in any of these - arrays... */ - ((int *) faces)[i] = current->faces; - ((int *) widths)[i] = current->width; - ((int *) table_handles)[i] = current->table; - ((int *) var_indices)[i] = current->var; + if (faces) + { + ((int *) faces)[i] = current->faces; + } + if (widths) + { + ((int *) widths)[i] = current->width; + } + if (table_handles) + { + ((int *) table_handles)[i] = current->table; + } + if (var_indices) + { + ((int *) var_indices)[i] = current->var; + } } } } |