diff --git a/code/controllers/subsystem/timer.dm b/code/controllers/subsystem/timer.dm index abd58467e4..6c48531cf9 100644 --- a/code/controllers/subsystem/timer.dm +++ b/code/controllers/subsystem/timer.dm @@ -353,7 +353,14 @@ SUBSYSTEM_DEF(timer) /proc/addtimer(datum/callback/callback, wait, flags) if (!callback) - 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") wait = max(wait, 0) @@ -411,4 +418,4 @@ SUBSYSTEM_DEF(timer) #undef BUCKET_LEN -#undef BUCKET_POS \ No newline at end of file +#undef BUCKET_POS