null check

This commit is contained in:
Kyle Spearrin 2019-04-19 15:33:55 -04:00
parent 60efcbaf02
commit 6d8af4d97a
3 changed files with 6 additions and 6 deletions

View file

@ -1079,8 +1079,8 @@ namespace Bit.Core.Services
public int Compare(CipherView a, CipherView b) public int Compare(CipherView a, CipherView b)
{ {
var aName = a.Name; var aName = a?.Name;
var bName = b.Name; var bName = b?.Name;
if(aName == null && bName != null) if(aName == null && bName != null)
{ {
return -1; return -1;

View file

@ -218,8 +218,8 @@ namespace Bit.Core.Services
public int Compare(CollectionView a, CollectionView b) public int Compare(CollectionView a, CollectionView b)
{ {
var aName = a.Name; var aName = a?.Name;
var bName = b.Name; var bName = b?.Name;
if(aName == null && bName != null) if(aName == null && bName != null)
{ {
return -1; return -1;

View file

@ -256,8 +256,8 @@ namespace Bit.Core.Services
public int Compare(FolderView a, FolderView b) public int Compare(FolderView a, FolderView b)
{ {
var aName = a.Name; var aName = a?.Name;
var bName = b.Name; var bName = b?.Name;
if(aName == null && bName != null) if(aName == null && bName != null)
{ {
return -1; return -1;