Revision: 4659
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4659&view=rev
Author:   hofman
Date:     2008-09-20 21:59:00 +0000 (Sat, 20 Sep 2008)

Log Message:
-----------
condition on non-nil return of initializer

Modified Paths:
--------------
    trunk/PDFAnnotation_SKExtensions.m

Modified: trunk/PDFAnnotation_SKExtensions.m
===================================================================
--- trunk/PDFAnnotation_SKExtensions.m  2008-09-20 16:21:28 UTC (rev 4658)
+++ trunk/PDFAnnotation_SKExtensions.m  2008-09-20 21:59:00 UTC (rev 4659)
@@ -316,11 +316,13 @@
                     bounds = NSInsetRect(NSIntegralRect(bounds), -8.0, -8.0);
                     NSAffineTransform *transform = [NSAffineTransform 
transform];
                     [transform translateXBy:-NSMinX(bounds) 
yBy:-NSMinY(bounds)];
-                    [paths 
makeObjectsPerformSelector:@selector(transformUsingAffineTransform:) 
withObject:transform];
-                    self = [[PDFAnnotationInk alloc] 
initSkimNoteWithBounds:bounds];
-                    pEnum = [paths objectEnumerator];
-                    while (path = [pEnum nextObject])
-                        [(PDFAnnotationInk *)self addBezierPath:path];
+                    if (self = [[PDFAnnotationInk alloc] 
initSkimNoteWithBounds:bounds]) {
+                        pEnum = [paths objectEnumerator];
+                        while (path = [pEnum nextObject]) {
+                            [path transformUsingAffineTransform:transform];
+                            [(PDFAnnotationInk *)self addBezierPath:path];
+                        }
+                    }
                     [paths release];
                 }
             } else if (type == SKScriptingTextNote) {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to