control available lanes to paint

This commit is contained in:
Alberto Fanjul 2023-03-07 22:11:18 +01:00
parent e4366f8cdf
commit 313e6ce90c

View file

@ -342,12 +342,12 @@ public class Lanes : Object
var commit = item.data;
unowned SList<Lane> lns = commit.get_lanes();
if (lns != null && index <= lns.length())
if (lns != null && index < lns.length())
{
unowned Lane lane = lns.nth_data(index);
if (item.next != null)
{
if (item.next != null && lane.from != null)
{
var newindex = lane.from.data;
lns = commit.remove_lane(lane);