From f109d535b1fdc50c21e90aff05fef6e5f6950952 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Thu, 21 Feb 2013 12:44:01 -0800 Subject: [PATCH] Add a null check to avoid passing null to io_chain_t::push_back https://github.com/fish-shell/fish-shell/issues/590 --- parser.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/parser.cpp b/parser.cpp index b592ed9bf..529550d79 100644 --- a/parser.cpp +++ b/parser.cpp @@ -1560,8 +1560,10 @@ void parser_t::parse_job_argument_list(process_t *p, new_io.reset(new_io_file); } } - - j->io.push_back(new_io); + + if (new_io.get() != NULL) { + j->io.push_back(new_io); + } } break;