summaryrefslogtreecommitdiff
path: root/copy_cmd.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2011-12-03 12:52:47 -0500
committerChet Ramey <chet.ramey@case.edu>2011-12-03 12:52:47 -0500
commit5e13499c55639e93fbe46ce3dc053d74e5578cf9 (patch)
treefa9727e25343ed0d726c0690e3e255f9f696d422 /copy_cmd.c
parentd3a24ed242e91e6afb53b2cbf38b89667637168d (diff)
downloadbash-5e13499c55639e93fbe46ce3dc053d74e5578cf9.tar.gz
commit bash-20040107 snapshot
Diffstat (limited to 'copy_cmd.c')
-rw-r--r--copy_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/copy_cmd.c b/copy_cmd.c
index 37ceb2c8..d36436c9 100644
--- a/copy_cmd.c
+++ b/copy_cmd.c
@@ -308,7 +308,7 @@ copy_function_def_contents (old, new_def)
FUNCTION_DEF *old, *new_def;
{
new_def->name = copy_word (old->name);
- new_def->command = copy_command (old->command);
+ new_def->command = old->command ? copy_command (old->command) : old->command;
new_def->flags = old->flags;
new_def->line = old->line;
new_def->source_file = old->source_file ? savestring (old->source_file) : old->source_file;