From 4bba08f72314824df075387b3f8fb4450d192e5a Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Wed, 16 Feb 2022 20:50:52 +0000 Subject: check validity of viewentity before checking if it's local --- Northstar.Client/mod/scripts/vscripts/sh_menu_models.gnut | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Northstar.Client/mod/scripts/vscripts/sh_menu_models.gnut b/Northstar.Client/mod/scripts/vscripts/sh_menu_models.gnut index b1b97bc9..6d446654 100644 --- a/Northstar.Client/mod/scripts/vscripts/sh_menu_models.gnut +++ b/Northstar.Client/mod/scripts/vscripts/sh_menu_models.gnut @@ -2531,7 +2531,7 @@ // setting menu camera while our viewentity isn't player will crash // unfortunately no way to close menu if we get our viewentity set while menu is open atm - while ( GetViewEntity().GetClassName() == "class C_BaseEntity" ) + while ( IsValid( GetViewEntity() ) && GetViewEntity().GetClassName() == "class C_BaseEntity" ) WaitFrame() if ( file.presentationTypeInitialized && presentationType == file.presentationType ) -- cgit v1.2.3