summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/romcc/romcc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c
index 571a29f94b..285b0237f4 100644
--- a/util/romcc/romcc.c
+++ b/util/romcc/romcc.c
@@ -1989,7 +1989,7 @@ static struct occurrence *new_occurrence(struct compile_state *state)
(last->line == line) &&
(last->function == function) &&
((last->filename == filename) ||
- (strcmp(last->filename, filename) == 0)))
+ (filename != NULL && strcmp(last->filename, filename) == 0)))
{
get_occurrence(last);
return last;