mirror of
https://github.com/bitwarden/mobile
synced 2025-12-17 16:53:26 +00:00
fix for crash when terminating app (#1589)
This commit is contained in:
@@ -188,6 +188,12 @@ namespace Bit.iOS
|
|||||||
_storageService.SaveAsync(Constants.LastActiveTimeKey, _deviceActionService.GetActiveTime());
|
_storageService.SaveAsync(Constants.LastActiveTimeKey, _deviceActionService.GetActiveTime());
|
||||||
_messagingService.Send("slept");
|
_messagingService.Send("slept");
|
||||||
|
|
||||||
|
if (UIApplication.SharedApplication.KeyWindow == null)
|
||||||
|
{
|
||||||
|
// Despite IDE warning, KeyWindow is null here during app termination in iOS 15
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var view = new UIView(UIApplication.SharedApplication.KeyWindow.Frame)
|
var view = new UIView(UIApplication.SharedApplication.KeyWindow.Frame)
|
||||||
{
|
{
|
||||||
Tag = 4321
|
Tag = 4321
|
||||||
|
|||||||
Reference in New Issue
Block a user