diff --git a/direct/src/dist/FreezeTool.py b/direct/src/dist/FreezeTool.py index f7b2ea9b91..237deb9cf3 100644 --- a/direct/src/dist/FreezeTool.py +++ b/direct/src/dist/FreezeTool.py @@ -1299,7 +1299,8 @@ class Freezer: for moduleName, module in list(self.mf.modules.items()): if module.__code__: origPathname = module.__code__.co_filename - replace_paths.append((origPathname, moduleName)) + if origPathname: + replace_paths.append((origPathname, moduleName)) self.mf.replace_paths = replace_paths # Now that we have built up the replacement mapping, go back