ibireme преди 9 години
родител
ревизия
5a2557435c
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      YYText/Component/YYTextLayout.m

+ 2 - 0
YYText/Component/YYTextLayout.m

@@ -2276,6 +2276,8 @@ static void YYTextSetLinePatternInContext(YYTextLineStyle style, CGFloat width,
 
 
 static void YYTextDrawBorderRects(CGContextRef context, CGSize size, YYTextBorder *border, NSArray *rects, BOOL isVertical) {
+    if (rects.count == 0) return;
+    
     YYTextShadow *shadow = border.shadow;
     if (shadow.color) {
         CGContextSaveGState(context);