Kaynağa Gözat

ComPDFKit.Tool(lynxpdf) - 图章创建空对象检测

liyuxuan 1 ay önce
ebeveyn
işleme
ab4d24ea8d

+ 4 - 0
Demo/Examples/ComPDFKit.Tool/CPDFToolManager.cs

@@ -1405,6 +1405,10 @@ namespace ComPDFKit.Tool
                                 }
                                 else
                                 {
+                                    if( annotation == null || annotation.IsValid()==false)
+                                    {
+                                        return;
+                                    }
                                     CPDFDocument cPDFDocument = viewerTool.GetCPDFViewer().GetDocument();
                                     CPDFPage cPDFPage = cPDFDocument.PageAtIndex(pageindex);
                                     Point cropPoint = new Point();