aboutsummaryrefslogtreecommitdiff
path: root/src/SetupPGH.c
diff options
context:
space:
mode:
authortradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364>2001-08-30 14:09:35 +0000
committertradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364>2001-08-30 14:09:35 +0000
commit6ca9d86c3032ba54c1e935d00c6331699e27d896 (patch)
tree94a37669709435265ef9382194138034cae0b0c4 /src/SetupPGH.c
parenta7bf798652ee626d91d7364bd5a9c4d5e024827e (diff)
Enable/disable storage for CCTK_SCALAR variables. Although memory for those
types is allocated only once (in the first call to CCTK_EnableGroupStorage()) the current state of allocation is kept in a flag for every group. This is returned by CCTK_QueryGroupStorage() then. Main purpose of this is to make the NaNChecker working for CCTK_SCALARs also. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@342 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src/SetupPGH.c')
-rw-r--r--src/SetupPGH.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/SetupPGH.c b/src/SetupPGH.c
index d1a3caa..f9b05e4 100644
--- a/src/SetupPGH.c
+++ b/src/SetupPGH.c
@@ -274,7 +274,10 @@ void PUGH_DestroyPGH (pGH **GHin)
PUGH_DestroyGArray(&(((pGA ***)GH->variables)[variable][i]));
break;
case CCTK_SCALAR:
- free(GH->variables[variable][i]);
+ if (GH->variables[variable][i])
+ {
+ free(GH->variables[variable][i]);
+ }
break;
}
}