summaryrefslogtreecommitdiff
path: root/tokenizer.c
diff options
context:
space:
mode:
Diffstat (limited to 'tokenizer.c')
-rw-r--r--tokenizer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tokenizer.c b/tokenizer.c
index 4c1d31a..901c2ee 100644
--- a/tokenizer.c
+++ b/tokenizer.c
@@ -171,8 +171,8 @@ static void tokr_err_(
const char *src_file, int src_line,
#endif
Tokenizer *t, const char *fmt, ...) {
- if (!t->token->where.ctx->enabled) return;
#if ERR_SHOW_SOURCE_LOCATION
+ if (t->token->where.ctx && !t->token->where.ctx->enabled) return;
err_fprint("At line %d of %s:\n", src_line, src_file);
#endif
va_list args;