aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/apply.c6
-rw-r--r--src/interpolate.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/apply.c b/src/apply.c
index 20f8993..6170234 100644
--- a/src/apply.c
+++ b/src/apply.c
@@ -591,6 +591,12 @@ ReflectionSymmetry_Apply (CCTK_ARGUMENTS)
CCTK_WARN (0, "Internal error in Boundary_SelectedGVs");
}
+ if (nvars == 0)
+ {
+ /* Nothing to do */
+ return;
+ }
+
indices = malloc (nvars * sizeof *indices);
if (! indices)
{
diff --git a/src/interpolate.c b/src/interpolate.c
index 9d52c9a..884abe6 100644
--- a/src/interpolate.c
+++ b/src/interpolate.c
@@ -88,7 +88,7 @@ ReflectionSymmetry_Interpolate (CCTK_POINTER_TO_CONST restrict const cctkGH_,
{
new_interp_coords[dir]
= malloc (N_interp_points * sizeof (CCTK_REAL));
- assert (new_interp_coords[dir]);
+ assert (N_interp_points == 0 || new_interp_coords[dir]);
for (n=0; n<N_interp_points; ++n)
{