summaryrefslogtreecommitdiff
path: root/gcc/c-lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-lex.c')
-rw-r--r--gcc/c-lex.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index f3cdd3cffb0..5546fc9ddd1 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -212,6 +212,12 @@ cb_dir_change (cpp_reader *pfile ATTRIBUTE_UNUSED, const char *dir)
void
fe_file_change (const struct line_map *new_map)
{
+ if (new_map == NULL)
+ {
+ map = NULL;
+ return;
+ }
+
if (new_map->reason == LC_ENTER)
{
/* Don't stack the main buffer on the input stack;