]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
params should be deleted, not unref()d
authorWolfgang Bumiller <wolfgang.linux@bumiller.com>
Sun, 29 Apr 2012 17:45:14 +0000 (19:45 +0200)
committerWolfgang Bumiller <wolfgang.linux@bumiller.com>
Sun, 29 Apr 2012 17:45:14 +0000 (19:45 +0200)
ast.c

diff --git a/ast.c b/ast.c
index faba42527df9780ebfc9ca213d3c9056ab42aaf2..3474dfca472735545e6689529e1b642b753a2beb 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -80,7 +80,7 @@ void ast_value_delete(ast_value* self)
     if (self->name)
         mem_d((void*)self->name);
     for (i = 0; i < self->params_count; ++i)
-        ast_unref(self->params[i]);
+        ast_value_delete(self->params[i]); /* delete, the ast_function is expected to die first */
     MEM_VECTOR_CLEAR(self, params);
     if (self->next) /* delete, not unref, types are always copied */
         ast_delete(self->next);