Dont't crash if tomo.Run callback calls tomo.Stop

This commit is contained in:
Sasha Koshka 2024-07-19 13:40:56 -04:00
parent dc50e7290d
commit 109283f520

View File

@ -24,6 +24,8 @@ func Run (callback func ()) error {
backendLock.Unlock()
callback()
// callback may have called tomo.Stop
if backend == nil { return nil }
return backend.Run()
}