Skip to content

Commit

Permalink
Merge pull request #615 from Shallowmallow/Fix-for-component_allowDis…
Browse files Browse the repository at this point in the history
…pose

Fix for null component allowDispose on Screen
  • Loading branch information
ianharrigan authored Jul 4, 2024
2 parents e6045e6 + ab18a04 commit 4849b85
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 4849b85

Please sign in to comment.