comparison place.c @ 95:1c0575f7dd46

Don't crash printing the commandline place.
author David A. Holland
date Mon, 10 Jun 2013 23:33:15 -0400
parents 2e25e55dba6b
children 33954a07d013
comparison
equal deleted inserted replaced
94:de18d1ac7d34 95:1c0575f7dd46
151 void 151 void
152 place_printfrom(const struct place *p) 152 place_printfrom(const struct place *p)
153 { 153 {
154 const struct place *from; 154 const struct place *from;
155 155
156 if (p->file == NULL) {
157 return;
158 }
156 from = &p->file->includedfrom; 159 from = &p->file->includedfrom;
157 if (from->type != P_NOWHERE) { 160 if (from->type != P_NOWHERE) {
158 place_printfrom(from); 161 place_printfrom(from);
159 fprintf(stderr, "In file included from %s:%u:%u:\n", 162 fprintf(stderr, "In file included from %s:%u:%u:\n",
160 place_getname(from), from->line, from->column); 163 place_getname(from), from->line, from->column);