diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2019-11-05 18:10:47 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2019-11-05 19:22:01 +1100 |
commit | cd3874ffb7826099574f2661475ff24298d16a64 (patch) | |
tree | 2503e86c6ab46f227ff4ca65503c57cad00f1289 /pkg/gui/patch_building_panel.go | |
parent | 10fe88a2cf79d525f4dfa767b2d0fab1793127e8 (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.go | 4 |
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 |