summaryrefslogtreecommitdiffstats
path: root/pkg/gui/remotes_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-10-07 22:21:15 +1100
committerJesse Duffield <jessedduffield@gmail.com>2020-10-10 00:23:01 +1100
commit9011271a014025c514adf72b1d1ee69fbc7f3373 (patch)
tree56aa883701820fd538289a58c628c065cde971a2 /pkg/gui/remotes_panel.go
parent777ec0b36c5e7b7ba67766ec1bef3ebb3d60f599 (diff)
fix another panic error
Diffstat (limited to 'pkg/gui/remotes_panel.go')
-rw-r--r--pkg/gui/remotes_panel.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/gui/remotes_panel.go b/pkg/gui/remotes_panel.go
index 9d1450003..f3c984d78 100644
--- a/pkg/gui/remotes_panel.go
+++ b/pkg/gui/remotes_panel.go
@@ -58,7 +58,12 @@ func (gui *Gui) refreshRemotes() error {
}
}
- return gui.postRefreshUpdate(gui.mustContextForContextKey(gui.getBranchesView().Context))
+ branchesView := gui.getBranchesView()
+ if branchesView != nil {
+ return gui.postRefreshUpdate(gui.mustContextForContextKey(branchesView.Context))
+ }
+
+ return nil
}
func (gui *Gui) handleRemoteEnter() error {