diff --git a/source/funkin/editors/ui/UIState.hx b/source/funkin/editors/ui/UIState.hx index f7db06b153..08a7daa6fb 100644 --- a/source/funkin/editors/ui/UIState.hx +++ b/source/funkin/editors/ui/UIState.hx @@ -18,9 +18,11 @@ class UIState extends MusicBeatState { public var curContextMenu:UIContextMenu = null; public static var state(get, never):UIState; + + public static var fallbackState:UIState = null; private inline static function get_state() - return FlxG.state is UIState ? cast FlxG.state : null; + return FlxG.state is UIState ? cast FlxG.state : fallbackState; public var buttonHandler:Void->Void = null; public var hoveredSprite:UISprite = null;