Skip to content

Commit 2afb6d5

Browse files
committed
Do the same in Cancel RingLayerAnimation
1 parent b43cff7 commit 2afb6d5

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

BTProgressHUD/ProgressHUD.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -698,18 +698,20 @@ private void CancelRingLayerAnimation()
698698
{
699699
CATransaction.Begin();
700700
CATransaction.DisableActions = true;
701-
HudView.Layer.RemoveAllAnimations();
701+
_hudView?.Layer.RemoveAllAnimations();
702702

703-
RingLayer.StrokeEnd = 0;
704-
if (RingLayer.SuperLayer != null)
703+
if (_ringLayer != null)
704+
_ringLayer.StrokeEnd = 0;
705+
706+
if (_ringLayer?.SuperLayer != null)
705707
{
706-
RingLayer.RemoveFromSuperLayer();
708+
_ringLayer.RemoveFromSuperLayer();
707709
}
708710
_ringLayer = null;
709711

710-
if (BackgroundRingLayer?.SuperLayer != null)
712+
if (_backgroundRingLayer?.SuperLayer != null)
711713
{
712-
BackgroundRingLayer.RemoveFromSuperLayer();
714+
_backgroundRingLayer.RemoveFromSuperLayer();
713715
}
714716
_backgroundRingLayer = null;
715717

0 commit comments

Comments
 (0)