mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-21 02:15:00 +00:00
fix: crash after remove worktree while it is opened in sourcegit (#1436)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
8d74586970
commit
957c52aac4
1 changed files with 1 additions and 1 deletions
|
@ -172,7 +172,7 @@ namespace SourceGit.ViewModels
|
|||
private set
|
||||
{
|
||||
var oldHead = _currentBranch?.Head;
|
||||
if (SetProperty(ref _currentBranch, value))
|
||||
if (SetProperty(ref _currentBranch, value) && value != null)
|
||||
{
|
||||
if (oldHead != _currentBranch.Head && _workingCopy is { UseAmend: true })
|
||||
_workingCopy.UseAmend = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue