From 455d261e80c409cf4ab10f7c38fd3de4203c6fd8 Mon Sep 17 00:00:00 2001 From: Ian Harrigan Date: Thu, 16 Nov 2023 18:52:23 +0100 Subject: [PATCH] incorrect null check --- haxe/ui/backend/flixel/UIRuntimeFragment.hx | 4 ++-- haxe/ui/backend/flixel/UIRuntimeState.hx | 4 ++-- haxe/ui/backend/flixel/UIRuntimeSubState.hx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/haxe/ui/backend/flixel/UIRuntimeFragment.hx b/haxe/ui/backend/flixel/UIRuntimeFragment.hx index 725aeea..21dbef2 100644 --- a/haxe/ui/backend/flixel/UIRuntimeFragment.hx +++ b/haxe/ui/backend/flixel/UIRuntimeFragment.hx @@ -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(); diff --git a/haxe/ui/backend/flixel/UIRuntimeState.hx b/haxe/ui/backend/flixel/UIRuntimeState.hx index 65ea853..f1cac83 100644 --- a/haxe/ui/backend/flixel/UIRuntimeState.hx +++ b/haxe/ui/backend/flixel/UIRuntimeState.hx @@ -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(); diff --git a/haxe/ui/backend/flixel/UIRuntimeSubState.hx b/haxe/ui/backend/flixel/UIRuntimeSubState.hx index 658bb97..01fe737 100644 --- a/haxe/ui/backend/flixel/UIRuntimeSubState.hx +++ b/haxe/ui/backend/flixel/UIRuntimeSubState.hx @@ -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();