Fix rare crash on player disconnect

pull/14/head
Brandon 2015-07-29 23:52:58 -05:00
parent 9cb663d488
commit 0b674b7bca
1 changed files with 5 additions and 3 deletions

View File

@ -16,9 +16,11 @@ function physics.adjust_physics(player,_physics)
end
function physics.apply(player)
local name = player:get_player_name()
if physics.player_frozen[name] ~= true then
player:set_physics_override(physics.player_physics[name])
if player ~= nil then
local name = player:get_player_name()
if physics.player_frozen[name] ~= true then
player:set_physics_override(physics.player_physics[name])
end
end
end