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:
ridiculousfish 2013-02-20 12:25:01 -08:00
parent fbedf020bc
commit c9b4163e23

View File

@ -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;