1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-14 23:33:34 +00:00

PM-3349 PM-3350 Improved code safety with try...catch, better invoke on main thread and better null handling.

This commit is contained in:
Federico Maccaroni
2024-01-19 15:01:31 -03:00
parent 01ee1ff845
commit 4717f5e230
21 changed files with 612 additions and 377 deletions

View File

@@ -81,7 +81,7 @@ namespace Bit.App
{
get
{
return Application.Current.Windows.OfType<ResumeWindow>().FirstOrDefault(w => w.IsActive);
return Application.Current?.Windows.OfType<ResumeWindow>().FirstOrDefault(w => w.IsActive);
}
}
@@ -145,11 +145,14 @@ namespace Bit.App
{
get
{
return Application.Current.MainPage;
return Application.Current?.MainPage;
}
set
{
Application.Current.MainPage = value;
if (Application.Current != null)
{
Application.Current.MainPage = value;
}
}
}
#endif