fix invalid memory address or nil pointer when $EDITOR is empty

master 1.2.2
skanehira 5 years ago
parent 7e19c80c78
commit 96161748ac

@ -357,8 +357,9 @@ func (g *Gui) EditWithEditor() {
editor := os.Getenv("EDITOR")
if editor == "" {
log.Println(fmt.Sprintf("$EDITOR is empty: %s", err))
g.Message(err.Error(), "main", func() {})
msg := fmt.Sprint("$EDITOR is empty")
log.Println(msg)
g.Message(msg, "main", func() {})
return
}

Loading…
Cancel
Save