aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Northstar.Client/mod/scripts/vscripts/sh_menu_models.gnut2
1 files changed, 1 insertions, 1 deletions
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 )