From fe4531054ddeeffc684f57ad0ff865bb53dcb106 Mon Sep 17 00:00:00 2001 From: Chris Brunner Date: Tue, 6 Jul 2010 21:58:01 +0000 Subject: [PATCH] check to make sure _Pmw is loaded before doing stuff with it --- direct/src/showbase/TkGlobal.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/direct/src/showbase/TkGlobal.py b/direct/src/showbase/TkGlobal.py index a46732835b..1f2767d299 100644 --- a/direct/src/showbase/TkGlobal.py +++ b/direct/src/showbase/TkGlobal.py @@ -10,8 +10,10 @@ import sys # This is required by the ihooks.py module used by Squeeze (used by # pandaSqueezer.py) so that Pmw initializes properly -sys.modules['_Pmw'].__name__ = '_Pmw' +if '_Pmw' in sys.modules: + sys.modules['_Pmw'].__name__ = '_Pmw' +if __builtins__["tkroot"] = Pmw.initialise() def tkLoop(self):