Mercurial > nagslang
changeset 279:9f68e22c1e58
Don't crash on empty walls
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Thu, 05 Sep 2013 13:47:22 +0200 |
parents | e72025e9aa07 |
children | 7bb6296024c4 |
files | nagslang/screens/area.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/nagslang/screens/area.py Thu Sep 05 13:34:37 2013 +0200 +++ b/nagslang/screens/area.py Thu Sep 05 13:47:22 2013 +0200 @@ -101,6 +101,9 @@ body.position = (0, 0) walls = self._level.get_walls() for wall in walls: + if len(wall) < 2: + # Don't try to add a useless wall + continue corners = wall corner = corners[-1] for next_corner in corners: