diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-08-12 09:51:45 +0900 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-08-12 09:51:45 +0900 |
commit | 5493af8c8f13ab3b6ab4caab4d00189b49d7f50f (patch) | |
tree | be8d3d48312867bbee4849ef756f8a44c57710dd | |
parent | 2b6ec504e536885a47db1e472c5f0de6388fb0ce (diff) |
Prevent drawing terminal with nil cmd
-rw-r--r-- | widgets/terminal.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/widgets/terminal.go b/widgets/terminal.go index aa7c2ba..008a36f 100644 --- a/widgets/terminal.go +++ b/widgets/terminal.go @@ -230,7 +230,7 @@ func (term *Terminal) Draw(ctx *ui.Context) { Cols: uint16(ctx.Width()), Rows: uint16(ctx.Height()), } - if winsize.Cols == 0 || winsize.Rows == 0 { + if winsize.Cols == 0 || winsize.Rows == 0 || term.cmd == nil { return } |