diff options
-rw-r--r-- | src/Storage.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Storage.c b/src/Storage.c index c73e42f..eba35f1 100644 --- a/src/Storage.c +++ b/src/Storage.c @@ -642,7 +642,8 @@ static int PUGH_EnableGArrayGroupStorage (pGH *pughGH, (size_t) GA->extras->npoints * GA->varsize * GA->vector_size, &GA->padddata); } - if (!GA->data) + if (GA->extras->npoints * GA->varsize * GA->vector_size > 0 && + GA->padddata == NULL) { CCTK_VWarn(0, __LINE__, __FILE__, CCTK_THORNSTRING, "Error allocating memory " "block of size %.0f", |