Przeglądaj źródła

Added checking routine for when winCtrl.mouseWatcher is None

Gyedo Jeon 16 lat temu
rodzic
commit
5809061ac9
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      direct/src/directtools/DirectSession.py

+ 1 - 1
direct/src/directtools/DirectSession.py

@@ -390,7 +390,7 @@ class DirectSession(DirectObject):
         # [gjeon] change current camera dr, iRay, mouseWatcher accordingly to support multiple windows
         # [gjeon] change current camera dr, iRay, mouseWatcher accordingly to support multiple windows
         if not hasattr(self, 'oobeMode') or self.oobeMode == 0:
         if not hasattr(self, 'oobeMode') or self.oobeMode == 0:
             for winCtrl in base.winControls:
             for winCtrl in base.winControls:
-                if winCtrl.mouseWatcher.node().hasMouse():
+                if winCtrl.mouseWatcher and winCtrl.mouseWatcher.node().hasMouse():
                     self.win = winCtrl.win
                     self.win = winCtrl.win
                     self.camera = winCtrl.camera
                     self.camera = winCtrl.camera
                     self.trueCamera = self.camera
                     self.trueCamera = self.camera