From 58ef292fa7c39baf57e0de35373afd0c007b793d Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 15 Jun 2019 00:14:32 -0400 Subject: [PATCH] null checks --- src/App/Pages/Vault/AddEditPageViewModel.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/App/Pages/Vault/AddEditPageViewModel.cs b/src/App/Pages/Vault/AddEditPageViewModel.cs index 8db051bd7..1323478b7 100644 --- a/src/App/Pages/Vault/AddEditPageViewModel.cs +++ b/src/App/Pages/Vault/AddEditPageViewModel.cs @@ -367,6 +367,10 @@ namespace Bit.App.Pages public async Task SubmitAsync() { + if(Cipher == null) + { + return false; + } if(Xamarin.Essentials.Connectivity.NetworkAccess == Xamarin.Essentials.NetworkAccess.None) { await _platformUtilsService.ShowDialogAsync(AppResources.InternetConnectionRequiredMessage, @@ -406,6 +410,10 @@ namespace Bit.App.Pages } var cipher = await _cipherService.EncryptAsync(Cipher); + if(cipher == null) + { + return false; + } try { await _deviceActionService.ShowLoadingAsync(AppResources.Saving);