Skip to content

Commit a345f10

Browse files
authored
Fix do_after_many (#37441)
1 parent 5a3e8b9 commit a345f10

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

code/__HELPERS/unsorted.dm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@
572572
for(var/i = 1 to numticks)
573573
for(var/target in targets)
574574
var/image/target_progress_bar = targets[target]
575-
target_progress_bar.icon_state = "prog_bar_[round(((i / numticks) * 100), 10)]"
575+
target_progress_bar?.icon_state = "prog_bar_[round(((i / numticks) * 100), 10)]"
576576
sleep(delay_fraction)
577577
var/user_loc_to_check = use_user_turf ? get_turf(user) : user.loc
578578
for(var/atom/target in targets)
@@ -608,6 +608,8 @@
608608
progress_bar.loc = null
609609

610610
/proc/stop_progress_bar(var/mob/user, var/image/progress_bar)
611+
if(!progress_bar || !user)
612+
return
611613
progress_bar.icon_state = "prog_bar_stopped"
612614
spawn(0.2 SECONDS)
613615
remove_progress_bar(user, progress_bar)

0 commit comments

Comments
 (0)