aboutsummaryrefslogtreecommitdiff
path: root/src/Output2D.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Output2D.c')
-rw-r--r--src/Output2D.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Output2D.c b/src/Output2D.c
index a830e42..7d046a9 100644
--- a/src/Output2D.c
+++ b/src/Output2D.c
@@ -117,7 +117,12 @@ int IOASCII_Output2DVarAs (const cGH *GH, const char *fullname, const char *alia
retval = -1;
vindex = CCTK_VarIndex (fullname);
- if (CheckOutputVar (vindex) == 0)
+ if (vindex<0)
+ {
+ CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "There is no such variable %s. Ignoring IOASCII 2D output.",
+ fullname);
+ } else if (CheckOutputVar (vindex) == 0)
{
retval = IOASCII_Write2D (GH, vindex, alias);
}