Browse Source

more robust cleanup

Darren Ranalli 22 years ago
parent
commit
c834e52eca
1 changed files with 4 additions and 2 deletions
  1. 4 2
      direct/src/level/Level.py

+ 4 - 2
direct/src/level/Level.py

@@ -83,8 +83,10 @@ class Level:
             del self.createdEntities
             del self.createdEntities
         if hasattr(self, 'entities'):
         if hasattr(self, 'entities'):
             del self.entities
             del self.entities
-        del self.entId2spec
-        del self.spec
+        if hasattr(self, 'entId2spec'):
+            del self.entId2spec
+        if hasattr(self, 'spec'):
+            del self.spec
 
 
     def createEntityCreator(self):
     def createEntityCreator(self):
         self.notify.error(
         self.notify.error(