reader nil check in escapeExKey

This commit is contained in:
Pristáš Michal 2015-10-26 09:43:34 +01:00
parent 391c225c0b
commit 30303e5637
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ func escapeExKey(r rune, reader *bufio.Reader) rune {
switch r {
case 51:
r = CharDelete
if d, _, err := reader.ReadRune(); err != nil || d != 126 {
if reader != nil && d, _, err := reader.ReadRune(); err != nil || d != 126 {
reader.UnreadRune()
}
case 'D':