From 3433287894d2740e6aa96e0e8a1024829168a292 Mon Sep 17 00:00:00 2001 From: perfectionaq Date: Tue, 2 Jul 2024 16:55:39 +0300 Subject: [PATCH] fix infinite loop crash - issue #495 Fix an infinite loop caused by calling skeletonLayoutSubviews within itself. This sometimes can cause an infinite loop and a crash. --- .../Sources/Internal/UIKitExtensions/UIView+Swizzling.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/SkeletonViewCore/Sources/Internal/UIKitExtensions/UIView+Swizzling.swift b/SkeletonViewCore/Sources/Internal/UIKitExtensions/UIView+Swizzling.swift index 3c257161..8854df92 100644 --- a/SkeletonViewCore/Sources/Internal/UIKitExtensions/UIView+Swizzling.swift +++ b/SkeletonViewCore/Sources/Internal/UIKitExtensions/UIView+Swizzling.swift @@ -17,7 +17,6 @@ extension UIView { @objc func skeletonLayoutSubviews() { guard Thread.isMainThread else { return } - skeletonLayoutSubviews() guard sk.isSkeletonActive else { return } layoutSkeletonIfNeeded() }