diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2013-02-20 12:25:01 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-02-20 12:25:01 -0800 |
commit | c9b4163e231299f68152f96e540fab1162ad5927 (patch) | |
tree | 9a63e0da7dbd5b8ab6f3bea2b93066d0efa7c751 /exec.cpp | |
parent | fbedf020bcb41f45b0f7bb848134624ee3748a81 (diff) |
Fix a crash when redirecting a nonexistent file to a function
Diffstat (limited to 'exec.cpp')
-rw-r--r-- | exec.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |