From 0bb042566bbc56b8f57e7c960fd1aa28590774ba Mon Sep 17 00:00:00 2001 From: deathride58 Date: Mon, 1 Apr 2019 02:05:18 -0400 Subject: [PATCH] this is byond explanation - increases the amount of sanity checks in the client update part of /mob/Login() --- code/modules/mob/login.dm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index 8d1b4b18d4..4d5d75c7e6 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -43,12 +43,13 @@ if(client) client.change_view(CONFIG_GET(string/default_view)) // Resets the client.view in case it was changed. - if(client.player_details.player_actions.len) - for(var/datum/action/A in client.player_details.player_actions) - A.Grant(src) + if(client.player_details && istype(client.player_details)) + if(client.player_details.player_actions.len) + for(var/datum/action/A in client.player_details.player_actions) + A.Grant(src) - for(var/foo in client.player_details.post_login_callbacks) - var/datum/callback/CB = foo - CB.Invoke() + for(var/foo in client.player_details.post_login_callbacks) + var/datum/callback/CB = foo + CB.Invoke() log_message("Client [key_name(src)] has taken ownership of mob [src]([src.type])", LOG_OWNERSHIP)