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) {