From 6d8af4d97a5ef1d2dc47efc05f0fe4237f44f3b5 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 19 Apr 2019 15:33:55 -0400 Subject: [PATCH] null check --- src/Core/Services/CipherService.cs | 4 ++-- src/Core/Services/CollectionService.cs | 4 ++-- src/Core/Services/FolderService.cs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Core/Services/CipherService.cs b/src/Core/Services/CipherService.cs index cc00abb30..763e1fe90 100644 --- a/src/Core/Services/CipherService.cs +++ b/src/Core/Services/CipherService.cs @@ -1079,8 +1079,8 @@ namespace Bit.Core.Services public int Compare(CipherView a, CipherView b) { - var aName = a.Name; - var bName = b.Name; + var aName = a?.Name; + var bName = b?.Name; if(aName == null && bName != null) { return -1; diff --git a/src/Core/Services/CollectionService.cs b/src/Core/Services/CollectionService.cs index 4b5c3756f..bede65fd6 100644 --- a/src/Core/Services/CollectionService.cs +++ b/src/Core/Services/CollectionService.cs @@ -218,8 +218,8 @@ namespace Bit.Core.Services public int Compare(CollectionView a, CollectionView b) { - var aName = a.Name; - var bName = b.Name; + var aName = a?.Name; + var bName = b?.Name; if(aName == null && bName != null) { return -1; diff --git a/src/Core/Services/FolderService.cs b/src/Core/Services/FolderService.cs index 26b41541c..554ad9aaf 100644 --- a/src/Core/Services/FolderService.cs +++ b/src/Core/Services/FolderService.cs @@ -256,8 +256,8 @@ namespace Bit.Core.Services public int Compare(FolderView a, FolderView b) { - var aName = a.Name; - var bName = b.Name; + var aName = a?.Name; + var bName = b?.Name; if(aName == null && bName != null) { return -1;