summaryrefslogtreecommitdiff
path: root/expand.c
diff options
context:
space:
mode:
Diffstat (limited to 'expand.c')
-rw-r--r--expand.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/expand.c b/expand.c
index 29e3674..aebbe3f 100644
--- a/expand.c
+++ b/expand.c
@@ -442,7 +442,10 @@ variable_expand_for_file (line, file)
save = current_variable_set_list;
current_variable_set_list = file->variables;
- reading_file = &file->cmds->fileinfo;
+ if (file->cmds && file->cmds->fileinfo.filenm)
+ reading_file = &file->cmds->fileinfo;
+ else
+ reading_file = 0;
fnext = file->variables->next;
/* See if there's a pattern-specific variable struct for this target. */
if (!file->pat_searched)