Skip to content

Commit

Permalink
incorrect null check
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Nov 16, 2023
1 parent a7acc90 commit 455d261
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions haxe/ui/backend/flixel/UIRuntimeFragment.hx
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@ class UIRuntimeFragment extends UIFragmentBase implements IComponentDelegate { /
}

public function show() {
if (root != null) {
if (root == null) {
throw "no root component";
}
root.show();
}

public function hide() {
if (root != null) {
if (root == null) {
throw "no root component";
}
root.hide();
Expand Down
4 changes: 2 additions & 2 deletions haxe/ui/backend/flixel/UIRuntimeState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ class UIRuntimeState extends UIStateBase { // uses rtti to "build" a class with
}

public function show() {
if (root != null) {
if (root == null) {
throw "no root component";
}
root.show();
}

public function hide() {
if (root != null) {
if (root == null) {
throw "no root component";
}
root.hide();
Expand Down
4 changes: 2 additions & 2 deletions haxe/ui/backend/flixel/UIRuntimeSubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ class UIRuntimeSubState extends UISubStateBase { // uses rtti to "build" a class
}

public function show() {
if (root != null) {
if (root == null) {
throw "no root component";
}
root.show();
}

public function hide() {
if (root != null) {
if (root == null) {
throw "no root component";
}
root.hide();
Expand Down

0 comments on commit 455d261

Please sign in to comment.