diff options
author | schnetter <schnetter@20f44201-0f4f-0410-9130-e5fc2714a787> | 2006-08-23 00:59:19 +0000 |
---|---|---|
committer | schnetter <schnetter@20f44201-0f4f-0410-9130-e5fc2714a787> | 2006-08-23 00:59:19 +0000 |
commit | b1f8ce9bd98bb565efe6f9a0f99cac985500be60 (patch) | |
tree | 9c6571bdc7353dc0c3cac2b4198cb9424a95aaaf | |
parent | fdcfb9c3c77203e93b0082aa37eaf88de1c009f6 (diff) |
Handle the case of 0 interpolation points correctly. malloc can
return NULL in this case.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/RotatingSymmetry180/trunk@36 20f44201-0f4f-0410-9130-e5fc2714a787
-rw-r--r-- | src/rotatingsymmetry180.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rotatingsymmetry180.c b/src/rotatingsymmetry180.c index d28b40e..9cbde1d 100644 --- a/src/rotatingsymmetry180.c +++ b/src/rotatingsymmetry180.c @@ -575,6 +575,8 @@ void Rot180_ApplyBC (CCTK_ARGUMENTS) nvars = Boundary_SelectedGVs (cctkGH, 0, 0, 0, 0, 0, 0); assert (nvars>=0); + if (nvars==0) return; + indices = malloc (nvars * sizeof *indices); assert (indices); faces = malloc (nvars * sizeof *faces); |