From: John Levon <john.levon@xxxxxxxxxx> Sometimes, there's nothing on the statement stack. Signed-off-by: John Levon <john.levon@xxxxxxxxxx> Suggested-by: Toomas Soome <tsoome@xxxxxx> --- check_all_func_returns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_all_func_returns.c b/check_all_func_returns.c index f9d77449..1ff50433 100644 --- a/check_all_func_returns.c +++ b/check_all_func_returns.c @@ -74,7 +74,7 @@ static void check_func_return(struct expression *expr) stmt = last_ptr_list((struct ptr_list *)big_statement_stack); - if (stmt->type == STMT_EXPRESSION && stmt->expression == expr) + if (stmt && stmt->type == STMT_EXPRESSION && stmt->expression == expr) sm_error("unchecked function return '%s'", expr_to_str(expr->fn)); } -- 2.23.0