summary refs log tree commit diff stats
path: root/widgets
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-08-12 09:51:45 +0900
committerDrew DeVault <sir@cmpwn.com>2019-08-12 09:51:45 +0900
commit5493af8c8f13ab3b6ab4caab4d00189b49d7f50f (patch)
treebe8d3d48312867bbee4849ef756f8a44c57710dd /widgets
parent2b6ec504e536885a47db1e472c5f0de6388fb0ce (diff)
downloadaerc-5493af8c8f13ab3b6ab4caab4d00189b49d7f50f.tar.gz
Prevent drawing terminal with nil cmd
Diffstat (limited to 'widgets')
-rw-r--r--widgets/terminal.go2
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
 		}