Prevent drawing terminal with nil cmd

This commit is contained in:
Drew DeVault 2019-08-12 09:51:45 +09:00
parent 2b6ec504e5
commit 5493af8c8f

View file

@ -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
}