From 4a3654bf6a968e68aa8530aac79cef7606dedb8c Mon Sep 17 00:00:00 2001 From: Queenie77 <916869906@qq.com> Date: Wed, 17 Apr 2024 08:11:54 +0000 Subject: [PATCH] =?UTF-8?q?iOS17=20crash=20=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YYText/Utility/YYTextAsyncLayer.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/YYText/Utility/YYTextAsyncLayer.m b/YYText/Utility/YYTextAsyncLayer.m index 9f09700a..4a418c98 100644 --- a/YYText/Utility/YYTextAsyncLayer.m +++ b/YYText/Utility/YYTextAsyncLayer.m @@ -117,6 +117,10 @@ - (void)display { #pragma mark - Private - (void)_displayAsync:(BOOL)async { + if (self.bounds.size.width<=0 || self.bounds.size.height<=0) { + self.contents = nil; + return; + } __strong id delegate = (id)self.delegate; YYTextAsyncLayerDisplayTask *task = [delegate newAsyncDisplayTask]; if (!task.display) {