瀏覽代碼

Fix a bug with thunks to constant anonymous functions

jonathanvdc 8 年之前
父節點
當前提交
c67d87f46e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      kernel/modelverse_jit/jit.py

+ 1 - 1
kernel/modelverse_jit/jit.py

@@ -292,7 +292,7 @@ class ModelverseJit(object):
     def __lookup_external_body_impl(self, global_name, body_id):
         """Looks up an external function by global name. Returns a matching function,
            or None if no function was found."""
-        if self.compiled_function_lookup is not None:
+        if global_name is not None and self.compiled_function_lookup is not None:
             result = self.compiled_function_lookup(global_name)
             if result is not None and body_id is not None:
                 self.register_compiled(body_id, result, global_name)