From d6539855a19b43925dc0b31b44608cab17edebca Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 11 Dec 2009 20:33:48 +0000 Subject: [PATCH] avoid obscure crash --- direct/src/p3d/Packager.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/direct/src/p3d/Packager.py b/direct/src/p3d/Packager.py index 3e3824ba26..63e136e7e0 100644 --- a/direct/src/p3d/Packager.py +++ b/direct/src/p3d/Packager.py @@ -1761,7 +1761,15 @@ class Packager: self.addHost(self.host) # A search list for previously-built local packages. - self.installSearch = list(ConfigVariableSearchPath('pdef-path').getDirectories()) + + # We use a bit of caution to read the Filenames out of the + # config variable. Since cvar.getDirectories() returns a list + # of references to Filename objects stored within the config + # variable itself, we have to make a copy of each Filename + # returned, so they will persist beyond the lifespan of the + # config variable. + cvar = ConfigVariableSearchPath('pdef-path') + self.installSearch = map(Filename, cvar.getDirectories()) # The system PATH, for searching dll's and exe's. self.executablePath = DSearchPath()