aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom
diff options
context:
space:
mode:
authorCoopyy <pat.pvp.unturned@gmail.com>2022-02-19 22:12:38 -0600
committerGitHub <noreply@github.com>2022-02-20 01:12:38 -0300
commit8e7a9198057775f3aad4c676dc533aeadd54879e (patch)
treefc59d6a29bd509b4b8fb3af589b81aa0b2390415 /Northstar.Custom
parentc2d7b22d67a76ebacb4b1c80452a693c56c0ab21 (diff)
downloadNorthstarMods-8e7a9198057775f3aad4c676dc533aeadd54879e.tar.gz
NorthstarMods-8e7a9198057775f3aad4c676dc533aeadd54879e.zip
Prevent fastball client valid crashes (#235)
theres no checks if the panel is valid or not https://cdn.discordapp.com/attachments/941129346612068373/944097224885952552/20220217_201811.jpg
Diffstat (limited to 'Northstar.Custom')
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_fastball.gnut4
1 files changed, 3 insertions, 1 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_fastball.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_fastball.gnut
index f64658cf5..f5fae006c 100644
--- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_fastball.gnut
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_fastball.gnut
@@ -31,6 +31,8 @@ void function FastballCreateRui( entity player )
void function ServerCallback_FastballUpdatePanelRui( int panelHandle, int id )
{
entity panel = GetEntityFromEncodedEHandle( panelHandle )
+ if (!IsValid(panel))
+ return
var rui
if ( id == 0 )
rui = file.panelARui
@@ -94,4 +96,4 @@ void function FastballRespawnPlayerEffects_Threaded()
WaitFrame()
StartParticleEffectOnEntity( player.GetCockpit(), GetParticleSystemIndex( $"P_pod_screen_lasers_OUT" ), FX_PATTACH_ABSORIGIN_FOLLOW, -1 )
-} \ No newline at end of file
+}