summaryrefslogtreecommitdiffstats
path: root/pkg/gui/patch_building_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2019-11-05 18:10:47 +1100
committerJesse Duffield <jessedduffield@gmail.com>2019-11-05 19:22:01 +1100
commitcd3874ffb7826099574f2661475ff24298d16a64 (patch)
tree2503e86c6ab46f227ff4ca65503c57cad00f1289 /pkg/gui/patch_building_panel.go
parent10fe88a2cf79d525f4dfa767b2d0fab1793127e8 (diff)
don't let patch manager ever be nil
Diffstat (limited to 'pkg/gui/patch_building_panel.go')
-rw-r--r--pkg/gui/patch_building_panel.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/gui/patch_building_panel.go b/pkg/gui/patch_building_panel.go
index b32253557..26196f6d1 100644
--- a/pkg/gui/patch_building_panel.go
+++ b/pkg/gui/patch_building_panel.go
@@ -5,7 +5,7 @@ import (
)
func (gui *Gui) refreshPatchBuildingPanel() error {
- if gui.GitCommand.PatchManager == nil {
+ if gui.GitCommand.PatchManager.IsEmpty() {
return gui.handleEscapePatchBuildingPanel(gui.g, nil)
}
@@ -91,7 +91,7 @@ func (gui *Gui) handleEscapePatchBuildingPanel(g *gocui.Gui, v *gocui.View) erro
}
func (gui *Gui) refreshSecondaryPatchPanel() error {
- if gui.GitCommand.PatchManager != nil {
+ if !gui.GitCommand.PatchManager.IsEmpty() {
gui.State.SplitMainPanel = true
secondaryView := gui.getSecondaryView()
secondaryView.Highlight = true