diff --git a/code/modules/client/preference/preferences_mysql.dm b/code/modules/client/preference/preferences_mysql.dm index 77f11729293..0f589cabaf3 100644 --- a/code/modules/client/preference/preferences_mysql.dm +++ b/code/modules/client/preference/preferences_mysql.dm @@ -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,