print_flavor_text no longer runtimes when dna is null (#26609)

This commit is contained in:
chuga-git
2024-08-28 18:55:41 -05:00
committed by GitHub
parent 4f3827e6a1
commit 22c9f89e9e
+1 -1
View File
@@ -773,7 +773,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
/mob/proc/print_flavor_text(shrink = TRUE)
if(flavor_text && flavor_text != "")
var/msg = !dna.flavor_text ? replacetext(dna.flavor_text, "\n", " ") : replacetext(flavor_text, "\n", " ")
var/msg = dna?.flavor_text ? replacetext(dna.flavor_text, "\n", " ") : replacetext(flavor_text, "\n", " ")
if(length(msg) <= 40 || !shrink)
return "<span class='notice'>[msg]</span>" // There is already encoded by tgui_input
else