protect against another nil
This commit is contained in:
parent
1f33979af9
commit
5a9f3565aa
|
@ -166,6 +166,11 @@ func (w stdout) Write(p []byte) (n int, err error) {
|
|||
}
|
||||
|
||||
func (w *guiWidget) Write(p []byte) (n int, err error) {
|
||||
if w == nil {
|
||||
lines := strings.Split(strings.TrimSpace(string(p)), "\n")
|
||||
me.stdout.outputS = append(me.stdout.outputS, lines...)
|
||||
return len(p), nil
|
||||
}
|
||||
w.tainted = true
|
||||
me.writeMutex.Lock()
|
||||
defer me.writeMutex.Unlock()
|
||||
|
|
Loading…
Reference in New Issue