Explorar o código

assert model loaded

Darren Ranalli %!s(int64=22) %!d(string=hai) anos
pai
achega
8c9b7b114b
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      direct/src/level/SpecUtil.py

+ 1 - 0
direct/src/level/SpecUtil.py

@@ -56,6 +56,7 @@ def privUpdateSpec(spec, modelPath, entTypeModule):
     TexturePool.setFakeTextureImage(
     TexturePool.setFakeTextureImage(
         '/i/alpha/player/install/ttmodels/src/fonts/ImpressBT.rgb')
         '/i/alpha/player/install/ttmodels/src/fonts/ImpressBT.rgb')
     model = loader.loadModel(modelPath)
     model = loader.loadModel(modelPath)
+    assert model is not None
     TexturePool.clearFakeTextureImage()
     TexturePool.clearFakeTextureImage()
     # get the model's zone info
     # get the model's zone info
     modelZoneNum2node = LevelUtil.getZoneNum2Node(model)
     modelZoneNum2node = LevelUtil.getZoneNum2Node(model)