]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ast.c
Update CHANGES file
[xonotic/gmqcc.git] / ast.c
diff --git a/ast.c b/ast.c
index be8ce2e5aae7c14c7a12a55d4d34dfa3d242245c..5a553cfffbf3fe366084b9ba15e48d719853c03b 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -890,6 +890,11 @@ ast_call* ast_call_new(lex_ctx ctx,
                        ast_expression *funcexpr)
 {
     ast_instantiate(ast_call, ctx, ast_call_delete);
+    if (!funcexpr->expression.next) {
+        compile_error(ctx, "not a function");
+        mem_d(self);
+        return NULL;
+    }
     ast_expression_init((ast_expression*)self, (ast_expression_codegen*)&ast_call_codegen);
 
     ast_side_effects(self) = true;