Fix crash when using the Tileset Editor when the given shape has no points

(cherry picked from commit 9501900e1b)
This commit is contained in:
Michael Alexsander Silva Dias 2019-04-02 11:45:18 -03:00 committed by Rémi Verschelde
parent 96222dedb5
commit 72b4844d42
1 changed files with 5 additions and 3 deletions

View File

@ -2417,9 +2417,11 @@ void TileSetEditor::draw_polygon_shapes() {
colors.push_back(c_bg);
}
}
if (polygon.size() > 2) {
workspace->draw_polygon(polygon, colors);
}
if (polygon.size() < 3)
continue;
workspace->draw_polygon(polygon, colors);
if (coord == edited_shape_coord || tileset->tile_get_tile_mode(get_current_tile()) == TileSet::SINGLE_TILE) {
if (!creating_shape) {