Skip to content

Commit b96d4aa

Browse files
Make sure to free layer scenes used in editor (#1955)
There was a bunch of leaked resources/nodes from this.
1 parent a8d79a7 commit b96d4aa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

addons/dialogic/Modules/StyleEditor/style_layer_editor.gd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ func load_layout_scene_customization(custom_scene_path:String, overrides:Diction
350350
child.get_parent().remove_child(child)
351351
child.queue_free()
352352

353-
var scene :Node = null
353+
var scene: Node = null
354354
if !custom_scene_path.is_empty() and FileAccess.file_exists(custom_scene_path):
355355
var pck_scn := load(custom_scene_path)
356356
if pck_scn:
@@ -453,6 +453,9 @@ func load_layout_scene_customization(custom_scene_path:String, overrides:Diction
453453
reset.pressed.connect(_on_export_override_reset.bind(i['name']))
454454
current_grid.add_child(input)
455455

456+
if scene:
457+
scene.queue_free()
458+
456459

457460
func collect_settings(properties:Array[Dictionary]) -> Array[Dictionary]:
458461
var settings: Array[Dictionary] = []

0 commit comments

Comments
 (0)