summaryrefslogtreecommitdiff
path: root/treeDraw.go
diff options
context:
space:
mode:
Diffstat (limited to 'treeDraw.go')
-rw-r--r--treeDraw.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/treeDraw.go b/treeDraw.go
index c305112..d678678 100644
--- a/treeDraw.go
+++ b/treeDraw.go
@@ -162,12 +162,20 @@ func (tk *guiWidget) drawView() {
log.Log(ERROR, "drawView() internal plugin error err = nil")
return
}
+
if !errors.Is(err, gocui.ErrUnknownView) {
tk.dumpWidget("drawView() err")
log.Log(ERROR, "drawView() internal plugin error error.IS()", err)
return
}
+ if tk.v == nil {
+ log.Info("MUTEX FAIL. tk.v == nil here in drawView()")
+ log.Info("MUTEX FAIL. tk.v == nil here in drawView()")
+ log.Info("MUTEX FAIL. tk.v == nil here in drawView()")
+ return
+ }
+
// this actually sends the text to display to gocui
tk.v.Wrap = true
tk.v.Frame = tk.frame
@@ -195,6 +203,14 @@ func (tk *guiWidget) drawView() {
}
default:
}
+
+ if tk.v == nil {
+ log.Info("MUTEX FAIL 2. tk.v was deleted somehow tk.v == nil here in drawView()")
+ log.Info("MUTEX FAIL 2. tk.v == nil here in drawView()")
+ log.Info("MUTEX FAIL 2. tk.v == nil here in drawView()")
+ return
+ }
+
// if you don't do this here, it will be black & white only
if tk.color != nil {
tk.v.FrameColor = tk.color.frame
@@ -203,6 +219,7 @@ func (tk *guiWidget) drawView() {
tk.v.SelFgColor = tk.color.selFg
tk.v.SelBgColor = tk.color.selBg
}
+
log.Log(INFO, "drawView() END")
}