Fixes runtimes caused by null client preferences (#16464)

* Client check

* Skip character randomisation
This commit is contained in:
SabreML
2021-08-01 12:31:43 +01:00
committed by GitHub
parent 3befeec4ab
commit baf15f25a7
@@ -126,10 +126,11 @@
qdel(query)
return 1
/datum/preferences/proc/load_character(client/C,slot)
/datum/preferences/proc/load_character(client/C, slot)
saved = FALSE
if(!slot) slot = default_slot
if(!slot)
slot = default_slot
slot = sanitize_integer(slot, 1, max_save_slots, initial(default_slot))
if(slot != default_slot)
default_slot = slot
@@ -142,6 +143,10 @@
return
qdel(firstquery)
if(!C) // If the client disconnected during the query, try again later.
qdel(src)
return TRUE
// Let's not have this explode if you sneeze on the DB
var/datum/db_query/query = SSdbcore.NewQuery({"SELECT
OOC_Notes,