summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/erec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/erec.c b/src/erec.c
index c550a596..5c3351a5 100644
--- a/src/erec.c
+++ b/src/erec.c
@@ -38,7 +38,8 @@ void erec_add_location(struct error_record *erec, const struct location *loc)
{
assert(erec->num_locations < EREC_LOCATIONS_MAX);
erec->locations[erec->num_locations] = *loc;
- erec->locations[erec->num_locations].indesc = loc->indesc;
+ erec->locations[erec->num_locations].indesc = loc->indesc ?
+ : &internal_indesc;
erec->num_locations++;
}