diff options
author | Hubert Hirtz <hubert@hirtz.pm> | 2021-01-07 12:17:31 +0100 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtz.pm> | 2021-01-07 12:17:31 +0100 |
commit | 511a95bef3656966098aa49eebe9427e9b43a935 (patch) | |
tree | b961b3c8643882ddc06605877af7d2ed6f409e2a /ui/ui.go | |
parent | Chathistory: don't send invalid timestamps (diff) |
Fix random crash on startup
The .exit value would be read before it was initialized.
Diffstat (limited to 'ui/ui.go')
-rw-r--r-- | ui/ui.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -46,6 +46,8 @@ func New(config Config) (ui *UI, err error) { ui.screen.Clear() ui.screen.ShowCursor(0, h-2) + ui.exit.Store(false) + ui.Events = make(chan tcell.Event, 128) go func() { for !ui.ShouldExit() { @@ -53,8 +55,6 @@ func New(config Config) (ui *UI, err error) { } }() - ui.exit.Store(false) - ui.bs = NewBufferList(w, h, ui.config.NickColWidth) ui.e = NewEditor(w, ui.config.AutoComplete) ui.Resize() |