diff options
author | schnetter <schnetter@c3c03602-0f4f-0410-b3fa-d2c81c8a7dc5> | 2006-08-23 00:58:27 +0000 |
---|---|---|
committer | schnetter <schnetter@c3c03602-0f4f-0410-b3fa-d2c81c8a7dc5> | 2006-08-23 00:58:27 +0000 |
commit | 858f0f9aa64d43a781fa379e0854209acf94c16a (patch) | |
tree | 18111fd21410096e97fee9231e509c8ea1809389 /src/rotatingsymmetry90.c | |
parent | c3a7d00dbef7a0c42eb5e47bbfc0c608878a54b1 (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/RotatingSymmetry90/trunk@38 c3c03602-0f4f-0410-b3fa-d2c81c8a7dc5
Diffstat (limited to 'src/rotatingsymmetry90.c')
-rw-r--r-- | src/rotatingsymmetry90.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rotatingsymmetry90.c b/src/rotatingsymmetry90.c index 8e89689..51150c4 100644 --- a/src/rotatingsymmetry90.c +++ b/src/rotatingsymmetry90.c @@ -594,6 +594,8 @@ void Rot90_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); |