Skip to content

Commit 0be367d

Browse files
committed
Fix child destruction
1 parent 5380718 commit 0be367d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

haxe/ui/backend/ComponentBase.hx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,9 @@ class ComponentBase {
423423

424424
private function handleRemoveComponent(child:Component, dispose:Bool = true):Component {
425425
__children.remove(child);
426-
if (window != null) {
427-
window.destroy();
428-
window = null;
426+
if (child.window != null) {
427+
child.window.destroy();
428+
child.window = null;
429429
}
430430
return child;
431431
}

0 commit comments

Comments
 (0)