mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-13 08:56:49 +01:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user