From 858f0f9aa64d43a781fa379e0854209acf94c16a Mon Sep 17 00:00:00 2001 From: schnetter Date: Wed, 23 Aug 2006 00:58:27 +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/RotatingSymmetry90/trunk@38 c3c03602-0f4f-0410-b3fa-d2c81c8a7dc5 --- src/interpolate.c | 4 ++-- src/rotatingsymmetry90.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/interpolate.c b/src/interpolate.c index 80a11c1..30a18f8 100644 --- a/src/interpolate.c +++ b/src/interpolate.c @@ -455,7 +455,7 @@ Rot90_SymmetryInterpolate (CCTK_POINTER_TO_CONST const cctkGH_, /* Copy coordinates */ for (d=0; d=0); + if (nvars==0) return; + indices = malloc (nvars * sizeof *indices); assert (indices); faces = malloc (nvars * sizeof *faces); -- cgit v1.2.3