diff --git a/srcpos.c b/srcpos.c index aa3aad0..9d38459 100644 --- a/srcpos.c +++ b/srcpos.c @@ -252,7 +252,7 @@ srcpos_string(struct srcpos *pos) const char *fname = ""; char *pos_str; - if (pos) + if (pos->file && pos->file->name) fname = pos->file->name;