From 3044198c4078b7bd72ecc84e833e490941d23d10 Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Thu, 30 Dec 2021 19:13:18 +0000 Subject: prevent script error in server browser --- .../mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Northstar.Client/mod/scripts') diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut index a989da12..7252d3d5 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut @@ -364,9 +364,13 @@ void function UpdateServerInfoBasedOnRes() //////////////////////////// void function OnCloseServerBrowserMenu() { - DeregisterButtonPressedCallback(MOUSE_WHEEL_UP , OnScrollUp) - DeregisterButtonPressedCallback(MOUSE_WHEEL_DOWN , OnScrollDown) - DeregisterButtonPressedCallback(KEY_TAB , OnKeyTabPressed) + try + { + DeregisterButtonPressedCallback(MOUSE_WHEEL_UP , OnScrollUp) + DeregisterButtonPressedCallback(MOUSE_WHEEL_DOWN , OnScrollDown) + DeregisterButtonPressedCallback(KEY_TAB , OnKeyTabPressed) + } + catch ( ex ) {} } void function OnServerBrowserMenuOpened() -- cgit v1.2.3