Fixed segfault on spacey input.
This commit is contained in:
parent
90c8c91410
commit
a4afd3b58a
@ -88,7 +88,10 @@ void ast_destroy_psv(AST* ast) {
|
||||
free(ast);
|
||||
}
|
||||
|
||||
void ast_print(AST* ast) { ast_print_i(ast, 0); }
|
||||
void ast_print(AST* ast) {
|
||||
if (!ast) return;
|
||||
ast_print_i(ast, 0);
|
||||
}
|
||||
|
||||
void ast_print_i(AST* ast, int i) {
|
||||
INDENT_BEGIN(i);
|
||||
|
@ -13,6 +13,8 @@
|
||||
AST* exec_start(AST* ast) {
|
||||
log_dbg("Started execution.");
|
||||
|
||||
if (!ast) return ast;
|
||||
|
||||
Scope* global = scope_init(NULL);
|
||||
global->uses = 1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user