Skip to content

Commit

Permalink
Fix for null component allowDispose on Screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Shallowmallow committed Jul 4, 2024
1 parent 276c5cb commit ab18a04
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions haxe/ui/core/Screen.hx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ class Screen extends ScreenImpl {
* @return The added component.
*/
public override function removeComponent(component:Component, dispose:Bool = true, invalidate:Bool = true):Component {
if (component == null) {
return null;
}

if (@:privateAccess !component._allowDispose) {
dispose = false;
}
Expand Down

0 comments on commit ab18a04

Please sign in to comment.