Skip to content

Commit d0b98a7

Browse files
committed
Clear out HudWindow when removing hud
1 parent 2afb6d5 commit d0b98a7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

BTProgressHUD/ProgressHUD.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public ProgressHUD(UIWindow window) : base(window.Bounds)
102102
AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
103103
}
104104

105-
public UIWindow HudWindow { get; private set; }
105+
public UIWindow? HudWindow { get; private set; }
106106

107107
public static CGRect KeyboardSize { get; private set; } = CGRect.Empty;
108108

@@ -774,6 +774,7 @@ private void RemoveHud()
774774
try
775775
{
776776
HudWindow?.RootViewController?.SetNeedsStatusBarAppearanceUpdate();
777+
HudWindow = null!;
777778
}
778779
catch (ObjectDisposedException)
779780
{

0 commit comments

Comments
 (0)