From f24b063f2135f495193dac4847b9f2489d1d954a Mon Sep 17 00:00:00 2001 From: Dominik Kaiser Date: Fri, 13 Sep 2024 16:23:04 +0200 Subject: Fix SEGV on invalid redirection --- src/print_ast.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/print_ast.c') diff --git a/src/print_ast.c b/src/print_ast.c index a511246..e1f0158 100644 --- a/src/print_ast.c +++ b/src/print_ast.c @@ -6,7 +6,7 @@ /* By: dkaiser type == CMD_NODE) + if (!ast) + panic("Parsing error"); + else if (ast->type == CMD_NODE) print_cmd_node(ast, indent); else if (ast->type == PIPE_NODE) { -- cgit v1.2.3