Ver código fonte

Allowed showBase to be created elsewhere

Gyedo Jeon 15 anos atrás
pai
commit
905f339346
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4 1
      direct/src/wxwidgets/WxPandaShell.py

+ 4 - 1
direct/src/wxwidgets/WxPandaShell.py

@@ -6,7 +6,10 @@ from pandac.PandaModules import *
 from direct.showbase.ShowBase import *
 from direct.directtools.DirectGlobals import *
 
-base = ShowBase(False)
+try:
+    base
+except NameError:
+    base = ShowBase(False)
 
 from WxAppShell import *
 from ViewPort import *