gocui panic loads nocui
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
bd24754c82
commit
0f9b7ec2af
7
init.go
7
init.go
|
@ -2,6 +2,7 @@ package tree
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"runtime/debug"
|
||||
"sync"
|
||||
|
||||
"go.wit.com/log"
|
||||
|
@ -13,6 +14,11 @@ var muAction sync.Mutex
|
|||
// TODO: add checks for nil function pointers
|
||||
func (me *TreeInfo) newAction(a widget.Action) {
|
||||
n := me.treeRoot.FindWidgetId(a.WidgetId)
|
||||
if n == nil {
|
||||
log.Log(TREEWARN, "tree.FindWidgetId() n == nil", a.WidgetId, a.WidgetType, a.ActionType)
|
||||
log.Log(TREEWARN, "tree.FindWidgetId() n == nil", a.State.CurrentS)
|
||||
log.Log(TREEWARN, "tree.FindWidgetId() n == nil. This should not happen. Bug in gui or tree package?")
|
||||
}
|
||||
switch a.ActionType {
|
||||
case widget.Add:
|
||||
if n == nil {
|
||||
|
@ -70,6 +76,7 @@ func (me *TreeInfo) catchActionChannel() {
|
|||
log.Log(TREEWARN, "YAHOOOO Recovered in tree.catchActionChannel()", r)
|
||||
log.Log(TREEWARN, "YAHOOOO Recovered in tree.catchActionChannel() Plugin:", me.PluginName)
|
||||
me.SendToolkitPanic()
|
||||
debug.PrintStack()
|
||||
me.ToolkitClose()
|
||||
}
|
||||
}()
|
||||
|
|
Loading…
Reference in New Issue