diff --git a/C/iopreds.c b/C/iopreds.c index 2631cb2ef..cb4549285 100644 --- a/C/iopreds.c +++ b/C/iopreds.c @@ -3870,7 +3870,8 @@ static Int } else { if (tokstart != NULL && tokstart->Tok != Ord (eot_tok)) { /* we got the end of file from an abort */ - if (!strcmp(Yap_ErrorMessage,"Abort")) { + if (Yap_ErrorMessage && + strcmp(Yap_ErrorMessage,"Abort")) { Yap_clean_tokenizer(tokstart, Yap_VarTable, Yap_AnonVarTable); return FALSE; }