diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 0a0cf25d2c..feaca1836b 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -2154,6 +2154,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
toggles ^= MEMBER_PUBLIC
if("gender")
var/chosengender = input(user, "Select your character's gender.", "Gender Selection", gender) as null|anything in list(MALE,FEMALE,"nonbinary","object")
+ if(!chosengender)
+ return
switch(chosengender)
if("nonbinary")
chosengender = PLURAL
diff --git a/code/modules/mob/living/brain/brain_item.dm b/code/modules/mob/living/brain/brain_item.dm
index 3b64c35969..f32d84ae73 100644
--- a/code/modules/mob/living/brain/brain_item.dm
+++ b/code/modules/mob/living/brain/brain_item.dm
@@ -88,7 +88,7 @@
brainmob.stored_dna = new /datum/dna/stored(brainmob)
C.dna.copy_dna(brainmob.stored_dna)
if(HAS_TRAIT(L, TRAIT_NOCLONE))
- brainmob.status_traits[TRAIT_NOCLONE] = L.status_traits[TRAIT_NOCLONE]
+ LAZYSET(brainmob.status_traits, TRAIT_NOCLONE, L.status_traits[TRAIT_NOCLONE])
var/obj/item/organ/zombie_infection/ZI = L.getorganslot(ORGAN_SLOT_ZOMBIE)
if(ZI)
brainmob.set_species(ZI.old_species) //For if the brain is cloned
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index b9ff07fe46..3c5ef91c41 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -283,6 +283,8 @@
/mob/living/carbon/resist_buckle()
. = FALSE
+ if(!buckled)
+ return
if(restrained())
// too soon.
if(last_special > world.time)
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 103e8164f9..4ef741745f 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -715,7 +715,7 @@
return TRUE
/mob/living/proc/resist_buckle()
- buckled.user_unbuckle_mob(src,src)
+ buckled?.user_unbuckle_mob(src,src)
/mob/living/proc/resist_fire()
return
diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm
index be43bc48fd..36a9bba295 100644
--- a/code/modules/projectiles/guns/energy.dm
+++ b/code/modules/projectiles/guns/energy.dm
@@ -65,10 +65,10 @@
update_icon()
/obj/item/gun/energy/Destroy()
- if(flags_1 & INITIALIZED_1)
- QDEL_NULL(cell)
- QDEL_LIST(ammo_type)
- STOP_PROCESSING(SSobj, src)
+ //no need to delete them, since contents are already deleted in atom/movable/Destroy().
+ cell = null
+ ammo_type = null
+ STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/gun/energy/examine(mob/user)
diff --git a/modular_citadel/code/datums/status_effects/chems.dm b/modular_citadel/code/datums/status_effects/chems.dm
index 82b3c39bb6..369fb377a5 100644
--- a/modular_citadel/code/datums/status_effects/chems.dm
+++ b/modular_citadel/code/datums/status_effects/chems.dm
@@ -23,11 +23,10 @@
owner.remove_status_effect(src)
..()
-/datum/status_effect/chem/SGDF/on_remove(mob/living/carbon/M)
+/datum/status_effect/chem/SGDF/on_remove()
log_game("FERMICHEM: SGDF mind shift applied. [owner] is now playing as their clone and should not have memories after their clone split (look up SGDF status applied). ID: [owner.key]")
originalmind.transfer_to(fermi_Clone)
to_chat(owner, "Lucidity shoots to your previously blank mind as your mind suddenly finishes the cloning process. You marvel for a moment at yourself, as your mind subconciously recollects all your memories up until the point when you cloned yourself. Curiously, you find that you memories are blank after you ingested the synthetic serum, leaving you to wonder where the other you is.")
- to_chat(M, "Lucidity shoots to your previously blank mind as your mind suddenly finishes the cloning process. You marvel for a moment at yourself, as your mind subconciously recollects all your memories up until the point when you cloned yourself. Curiously, you find that you memories are blank after you ingested the synthetic serum, leaving you to wonder where the other you is.")
fermi_Clone = null
return ..()
@@ -193,15 +192,14 @@
log_game("FERMICHEM: [M]'s possesser has been booted out into a astral ghost!")
originalmind.transfer_to(original)
-/datum/status_effect/chem/astral_insurance/on_remove(mob/living/carbon/M) //God damnit get them home!
- if(owner.mind == originalmind) //If they're home, HOORAY
- return ..()
- if(owner.mind)
- var/mob/living/simple_animal/astral/G = new(get_turf(M.loc))
- owner.mind.transfer_to(G)//Just in case someone else is inside of you, it makes them a ghost and should hopefully bring them home at the end.
- to_chat(G, "[M]'s conciousness snaps back to them as their astrogen runs out, kicking your projected mind out!'")
- log_game("FERMICHEM: [M]'s possesser has been booted out into a astral ghost!")
- originalmind.transfer_to(original)
+/datum/status_effect/chem/astral_insurance/on_remove() //God damnit get them home!
+ if(owner.mind != originalmind) //If they're home, HOORAY
+ if(owner.mind)
+ var/mob/living/simple_animal/astral/G = new(get_turf(owner))
+ owner.mind.transfer_to(G)//Just in case someone else is inside of you, it makes them a ghost and should hopefully bring them home at the end.
+ to_chat(G, "[owner]'s conciousness snaps back to them as their astrogen runs out, kicking your projected mind out!'")
+ log_game("FERMICHEM: [owner]'s possesser has been booted out into a astral ghost!")
+ originalmind.transfer_to(original)
return ..()
/*//////////////////////////////////////////