]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ast.c
Fix more bugs (mostly possible NULL pointer dereferences)
[xonotic/gmqcc.git] / ast.c
diff --git a/ast.c b/ast.c
index 913e852190d309745822d4a66be50b1b0ade93c2..5c42a304e0fa1008eb72b1180e705133783adbe5 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -1563,7 +1563,7 @@ bool ast_global_codegen(ast_value *self, ir_builder *ir, bool isfield)
     return true;
 
 error: /* clean up */
-    ir_value_delete(v);
+    if(v) ir_value_delete(v);
     return false;
 }