From 214eaad1f518fc6807dd22b917e605271495a6f3 Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Mon, 6 May 2024 22:45:00 -0600 Subject: [PATCH] Fix an editor crash when floating a selection containing a red button --- js/editor/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/editor/main.js b/js/editor/main.js index 5ece19b..0337bd0 100644 --- a/js/editor/main.js +++ b/js/editor/main.js @@ -1968,7 +1968,10 @@ export class Editor extends PrimaryView { for (let src of sources) { this.__delete_implicit_connection(src); let source_cell = this.stored_level.linear_cells[src]; - this._implicit_connect_tile(source_cell[LAYERS.terrain], source_cell, src); + let terrain = source_cell[LAYERS.terrain]; + if (terrain.type.connects_to) { + this._implicit_connect_tile(terrain, source_cell, src); + } } } }