summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
Diffstat (limited to 'init.go')
-rw-r--r--init.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/init.go b/init.go
index 9a9101b..9212f00 100644
--- a/init.go
+++ b/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()
}
}()