From b1f8ce9bd98bb565efe6f9a0f99cac985500be60 Mon Sep 17 00:00:00 2001 From: schnetter Date: Wed, 23 Aug 2006 00:59:19 +0000 Subject: 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 --- src/rotatingsymmetry180.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- cgit v1.2.3