]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Don't try to generate function code for functions without bodies
authorWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 22 Aug 2012 10:33:24 +0000 (12:33 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 22 Aug 2012 10:33:24 +0000 (12:33 +0200)
ir.c

diff --git a/ir.c b/ir.c
index 23064cbcd8a4baae1ef1ad722367e595b8c35931..074ed7f275b1b35b4617ddc29894e621989e5b9b 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -2598,6 +2598,11 @@ static bool gen_global_function_code(ir_builder *ir, ir_value *global)
     ir_function           *irfun;
 
     irfun = global->constval.vfunc;
+    if (!irfun) {
+        /* this was a function pointer, don't generate code for those */
+        return true;
+    }
+
     if (irfun->builtin)
         return true;