Mercurial > nagslang
diff tools/area_editor.py @ 425:1a85044f81a8
Safer color access
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sat, 07 Sep 2013 13:34:01 +0200 |
parents | a64d894aa1bd |
children | 275e0b4bd571 |
line wrap: on
line diff
--- a/tools/area_editor.py Sat Sep 07 13:30:06 2013 +0200 +++ b/tools/area_editor.py Sat Sep 07 13:34:01 2013 +0200 @@ -121,7 +121,7 @@ if filled: self._draw_exterior(True) for index, polygon in self.polygons.items(): - color = POLY_COLORS[index] + color = POLY_COLORS.get(index, pygame.color.THECOLORS['black']) if move_point_mode and index == self._move_poly: pointlist = [p for p in polygon] pointlist = [self.point_to_pygame(p) if p != move_point else