mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-23 03:05:13 +08:00
Fix a crash when redirecting a nonexistent file to a function
https://github.com/fish-shell/fish-shell/pull/574
This commit is contained in:
parent
fbedf020bc
commit
c9b4163e23
6
exec.cpp
6
exec.cpp
@ -429,10 +429,10 @@ static bool io_transmogrify(const io_chain_t &in_chain, io_chain_t &out_chain, s
|
||||
}
|
||||
}
|
||||
|
||||
/* Record this IO redirection even if we failed (so we can free it) */
|
||||
result_chain.push_back(out);
|
||||
if (out.get() != NULL)
|
||||
result_chain.push_back(out);
|
||||
|
||||
/* But don't go any further if we failed */
|
||||
/* Don't go any further if we failed */
|
||||
if (! success)
|
||||
{
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user