die if this isn't already init'd
This commit is contained in:
parent
24475c4173
commit
b61cf9902e
|
@ -9,8 +9,10 @@ package tree
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"go.wit.com/log"
|
||||||
"go.wit.com/widget"
|
"go.wit.com/widget"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -46,6 +48,12 @@ func (me *TreeInfo) InitOK() {
|
||||||
// before trying to do anything. todo: rethink this someday
|
// before trying to do anything. todo: rethink this someday
|
||||||
func (me *TreeInfo) WaitOK() {
|
func (me *TreeInfo) WaitOK() {
|
||||||
for {
|
for {
|
||||||
|
if me == nil {
|
||||||
|
log.Info("WaitOK lied. me == nil but returned anyway")
|
||||||
|
log.Info("WaitOK lied. me == nil but returned anyway")
|
||||||
|
log.Info("WaitOK lied. me == nil but returned anyway")
|
||||||
|
os.Exit(-1)
|
||||||
|
}
|
||||||
if me.ok {
|
if me.ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue