|
@@ -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)
|