Don't save erased guides in .pxos

This fixes a crash when saving a pxo with guides that have been removed
This commit is contained in:
OverloadedOrama 2020-07-27 20:03:15 +03:00
parent 8cca37e752
commit 8529e93029
2 changed files with 4 additions and 0 deletions

View file

@ -204,6 +204,8 @@ func serialize() -> Dictionary:
for guide in guides:
if guide is SymmetryGuide:
continue
if !is_instance_valid(guide):
continue
var coords = guide.points[0].x
if guide.type == Guide.Types.HORIZONTAL:
coords = guide.points[0].y