Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tools.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools.py')
-rw-r--r--tools.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools.py b/tools.py
index d9c107b..f896e1b 100644
--- a/tools.py
+++ b/tools.py
@@ -601,12 +601,13 @@ class DestroyTool(Tool):
destroyed_body = False
for key, info in tracklist:
trackdex = info[4]
- if trackdex in tokill[0].userData['track_indices'] and \
- info[3] is False:
- self.game.world.world.DestroyBody(info[1])
- self.game.trackinfo[key][3] = True
- destroyed_body = True
- break
+ if "track_indices" in tokill[0].userData:
+ if trackdex in tokill[0].userData['track_indices'] and \
+ info[3] is False:
+ self.game.world.world.DestroyBody(info[1])
+ self.game.trackinfo[key][3] = True
+ destroyed_body = True
+ break
jointnode = tokill[0].GetJointList()
if jointnode and not destroyed_body: