--- Coro/Coro/State.xs 2014/03/04 06:13:24 1.442 +++ Coro/Coro/State.xs 2014/03/06 06:40:32 1.443 @@ -2251,6 +2251,9 @@ { struct coro *self = SvSTATE_current; + if (!self) + croak ("Coro::cancel called outside of thread content,"); + /* otherwise we cancel directly, purely for speed reasons * unfortunately, this requires some magic trickery, as * somebody else could cancel us, so we have to fight the cancellation.