From 73ad4e73949f96a3473cc198ddbed934d35a7283 Mon Sep 17 00:00:00 2001 From: Alexey Yerin Date: Tue, 27 Apr 2021 19:41:39 +0300 Subject: Make sure app.s is not nil when issuing quit Prior to this, when the connection is lost, issuing /quit was causing a segfault. --- commands.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'commands.go') diff --git a/commands.go b/commands.go index 6be50ed..fee0571 100644 --- a/commands.go +++ b/commands.go @@ -277,7 +277,9 @@ func commandDoQuit(app *App, buffer string, args []string) (err error) { if 0 < len(args) { reason = args[0] } - app.s.Quit(reason) + if app.s != nil { + app.s.Quit(reason) + } app.win.Exit() return } -- cgit v1.2.3