From fcc36640cf116da6686a60a0402bc553e6719e00 Mon Sep 17 00:00:00 2001 From: Brian Cosgrove Date: Thu, 7 Nov 2024 01:44:10 +0000 Subject: [PATCH] Fix nil pointer deref introduced in 4.6.0 by introducing guard around potentially `nil` currSection This addresses #475 --- ui/ui.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/ui.go b/ui/ui.go index dfe4dc93..545c8ef4 100644 --- a/ui/ui.go +++ b/ui/ui.go @@ -546,7 +546,9 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } case execProcessFinishedMsg, tea.FocusMsg: - cmds = append(cmds, currSection.FetchNextPageSectionRows()...) + if currSection != nil { + cmds = append(cmds, currSection.FetchNextPageSectionRows()...) + } case tea.WindowSizeMsg: m.onWindowSizeChanged(msg)