Fix crash when using the Tileset Editor when the given shape has no points
This commit is contained in:
parent
7ca9863079
commit
9501900e1b
@ -2417,11 +2417,11 @@ void TileSetEditor::draw_polygon_shapes() {
|
|||||||
colors.push_back(c_bg);
|
colors.push_back(c_bg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (polygon.size() == 0)
|
|
||||||
|
if (polygon.size() < 3)
|
||||||
continue;
|
continue;
|
||||||
if (polygon.size() > 2) {
|
|
||||||
workspace->draw_polygon(polygon, colors);
|
workspace->draw_polygon(polygon, colors);
|
||||||
}
|
|
||||||
|
|
||||||
if (coord == edited_shape_coord || tileset->tile_get_tile_mode(get_current_tile()) == TileSet::SINGLE_TILE) {
|
if (coord == edited_shape_coord || tileset->tile_get_tile_mode(get_current_tile()) == TileSet::SINGLE_TILE) {
|
||||||
if (!creating_shape) {
|
if (!creating_shape) {
|
||||||
|
Loading…
Reference in New Issue
Block a user