diff options
-rw-r--r-- | src/DumpGH.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/DumpGH.c b/src/DumpGH.c index ac50d7e..df1cc4c 100644 --- a/src/DumpGH.c +++ b/src/DumpGH.c @@ -443,9 +443,10 @@ static int Checkpoint (const cGH *GH, int called_from) request->vindex < first_vindex + gdata.numvars; request->vindex++) { - /* loop over all timelevels of this variable */ + /* loop over all allocated timelevels of this variable */ for (request->timelevel = 0; - request->timelevel < gdata.numtimelevels; + request->timelevel < gdata.numtimelevels && + GH->data[request->vindex][request->timelevel]; request->timelevel++) { if (CCTK_Equals (verbose, "full")) |