Various Null Access Fixes (#22730)

<img width="1420" height="776" alt="image"
src="https://github.com/user-attachments/assets/d33c4ce2-9c5b-48c3-ac8b-5edfee51c7e0"
/>

Just a few fixes for some various runtime errors and two hard del
triggers on the Sentry logs.
This commit is contained in:
VMSolidus
2026-06-19 13:57:37 -04:00
committed by GitHub
parent 1c6938707c
commit a67a6ae94a
5 changed files with 23 additions and 11 deletions
+6 -2
View File
@@ -148,7 +148,9 @@
return P
else if (istype(c_item, /obj/item/paper_bundle))
var/obj/item/paper_bundle/B = bundlecopy(target, c_item, TRUE, toner)
sleep(15*B.pages.len)
if (!B)
return FALSE
sleep(15 * length(B.pages))
return B
else
to_chat(usr, SPAN_WARNING("\The [c_item] can't be copied by \the [target]."))
@@ -199,7 +201,7 @@
c.offset_y = copy.offset_y
var/list/temp_overlays = copy.overlays //Iterates through stamps
var/image/img //and puts a matching
for (var/j = 1, j <= min(temp_overlays.len, copy.ico.len), j++) //gray overlay onto the copy
for (var/j = 1, j <= min(length(temp_overlays), length(copy.ico)), j++) //gray overlay onto the copy
if (findtext(copy.ico[j], "cap") || findtext(copy.ico[j], "cent"))
img = image('icons/obj/bureaucracy.dmi', "paper_stamp-circle")
else if (findtext(copy.ico[j], "deny"))
@@ -270,6 +272,8 @@
W = copy_type(target, W, need_toner ? toner : 15, do_print)
if (!W)
continue
W.forceMove(p)
p.pages += W