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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user