From 3a11b4f068a6281ee64a6d4625bda67d825a48a5 Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 23 Jan 2018 10:43:07 -0200 Subject: [PATCH] Corrects addtime stack_trace typo --- code/controllers/subsystem/timer.dm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/code/controllers/subsystem/timer.dm b/code/controllers/subsystem/timer.dm index abd58467e4..9112a29542 100644 --- a/code/controllers/subsystem/timer.dm +++ b/code/controllers/subsystem/timer.dm @@ -353,7 +353,18 @@ SUBSYSTEM_DEF(timer) /proc/addtimer(datum/callback/callback, wait, flags) if (!callback) +<<<<<<< HEAD return +======= + CRASH("addtimer called without a callback") + + if (wait < 0) + stack_trace("addtimer called with a negative wait. Converting to 0") + + //alot of things add short timers on themselves in their destroy, we ignore those cases + if (wait >= 1 && callback && callback.object && callback.object != GLOBAL_PROC && QDELETED(callback.object)) + stack_trace("addtimer called with a callback assigned to a qdeleted object") +>>>>>>> f3b771b... Merge pull request #34774 from ShizCalev/addtimer-stack-track-typo wait = max(wait, 0)