1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-12 10:04:40 +02:00

Fixed forcetoggle crash

This commit is contained in:
Valansch 2018-04-15 12:32:05 +02:00 committed by GitHub
parent 999d7c141f
commit 9a17b48a87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -279,7 +279,7 @@ end
global.old_force = {}
global.force_toggle_init = true
local function forcetoggle(cmd)
if not game.player or not (game.player.admin or is_mod(game.player.name)) then
if not game.player or not (game.player.admin or is_mod(game.player.name)) or (not game.player.character) then
cant_run(cmd.name)
return
end