From d82aa339f84769fdb8cd643809a9576af395d261 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Mon, 11 May 2020 01:56:02 +0300 Subject: [PATCH] Fixed crash when loading a .pxo file with less layers than the current project already had --- src/Autoload/OpenSave.gd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Autoload/OpenSave.gd b/src/Autoload/OpenSave.gd index 044997dc0..e07ab713f 100644 --- a/src/Autoload/OpenSave.gd +++ b/src/Autoload/OpenSave.gd @@ -51,6 +51,7 @@ func open_pxo_file(path : String, untitled_backup : bool = false) -> void: var frame := 0 Global.layers.clear() + var linked_cels := [] if file_major_version >= 0 and file_minor_version > 6: var global_layer_line := file.get_line() @@ -123,6 +124,7 @@ func open_pxo_file(path : String, untitled_backup : bool = false) -> void: frame += 1 Global.canvases = Global.canvases # Just to call Global.canvases_changed + Global.current_layer = Global.layers.size() - 1 Global.current_frame = frame - 1 Global.layers = Global.layers # Just to call Global.layers_changed # Load tool options