mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
fix: crash when try to open context menu without selected changes in Changes page
This commit is contained in:
parent
6de92bb4d8
commit
f204a744bd
1 changed files with 2 additions and 2 deletions
|
@ -405,7 +405,7 @@ namespace SourceGit.ViewModels
|
||||||
|
|
||||||
public ContextMenu CreateContextMenuForUnstagedChanges()
|
public ContextMenu CreateContextMenuForUnstagedChanges()
|
||||||
{
|
{
|
||||||
if (_selectedUnstaged.Count == 0)
|
if (_selectedUnstaged == null || _selectedUnstaged.Count == 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
var menu = new ContextMenu();
|
var menu = new ContextMenu();
|
||||||
|
@ -691,7 +691,7 @@ namespace SourceGit.ViewModels
|
||||||
|
|
||||||
public ContextMenu CreateContextMenuForStagedChanges()
|
public ContextMenu CreateContextMenuForStagedChanges()
|
||||||
{
|
{
|
||||||
if (_selectedStaged.Count == 0)
|
if (_selectedStaged == null || _selectedStaged.Count == 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
var menu = new ContextMenu();
|
var menu = new ContextMenu();
|
||||||
|
|
Loading…
Reference in a new issue