소스 검색

【注释】修复“创建Form签名默认值为空崩溃”

wanjun 1 년 전
부모
커밋
22acd32c0a

+ 2 - 2
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFAnnotationExtensions/CPDFAnnotationModel.m

@@ -251,7 +251,7 @@
         } else if ([_annotation isKindOfClass:[CPDFRedactAnnotation class]]) {
         } else if ([_annotation isKindOfClass:[CPDFRedactAnnotation class]]) {
             color = [(CPDFRedactAnnotation *)_annotation borderColor];
             color = [(CPDFRedactAnnotation *)_annotation borderColor];
         } else {
         } else {
-            color = self.annotation.color;
+            color = self.annotation.color ? : NSColor.blackColor;
         }
         }
     } else {
     } else {
         NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
         NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
@@ -259,7 +259,7 @@
             case CAnnotationTypeFreeText:
             case CAnnotationTypeFreeText:
             case CAnnotationTypeSignText:
             case CAnnotationTypeSignText:
             case CAnnotationTypeSignDate:
             case CAnnotationTypeSignDate:
-                color = [userDefaults PDFListViewColorForKey:CFreeTextNoteBorderColorKey];
+                color = [userDefaults PDFListViewColorForKey:CFreeTextNoteBorderColorKey] ? : NSColor.blackColor;
                 break;
                 break;
             case CAnnotationTypeAnchored:
             case CAnnotationTypeAnchored:
                 color = [userDefaults PDFListViewColorForKey:CAnchoredNoteColorKey];
                 color = [userDefaults PDFListViewColorForKey:CAnchoredNoteColorKey];