Changeset 461:49f6adde49d0


Ignore:
Timestamp:
Sep 7, 2013, 1:53:20 PM (7 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
rebase_source:
cad617793f87b6cf7bf6915bedd58fe2b3155627
Message:

Protect against corner case crash

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/area_editor.py

    r459 r461  
    153153                pygame.draw.lines(self._surface, color, False, pointlist,
    154154                                  line_width)
    155             if index == mouse_poly and mouse_pos:
     155            if index == mouse_poly and mouse_pos and len(polygon) > 0:
    156156                endpoint = self.point_to_pymunk(mouse_pos)
    157157                pygame.draw.line(self._surface, color,
Note: See TracChangeset for help on using the changeset viewer.