Revision: 3575
http://skim-app.svn.sourceforge.net/skim-app/?rev=3575&view=rev
Author: amaxwell
Date: 2008-03-28 21:05:25 -0700 (Fri, 28 Mar 2008)
Log Message:
-----------
Fix crash when cropping pages due to NULL pointer dereference. Bug #1928379.
Modified Paths:
--------------
trunk/PDFPage_SKExtensions.m
Modified: trunk/PDFPage_SKExtensions.m
===================================================================
--- trunk/PDFPage_SKExtensions.m 2008-03-28 18:20:15 UTC (rev 3574)
+++ trunk/PDFPage_SKExtensions.m 2008-03-29 04:05:25 UTC (rev 3575)
@@ -94,9 +94,10 @@
}
[imageRep release];
r = NSIntersectionRect(NSInsetRect(r, -marginWidth, -marginHeight), b);
- *rectPtr = r;
+ rectPtr = &r;
CFDictionarySetValue(bboxCache, (void *)self, (void *)rectPtr);
}
+ // dereferencing here should always be safe (if not in the dictionary, it
was initialized)
return *rectPtr;
}
@@ -168,7 +169,7 @@
}
readingBarRect.origin = SKSubstractPoints(readingBarRect.origin,
bounds.origin);
-
+
image = [[NSImage alloc] initWithSize:thumbnailSize];
[image lockFocus];
[[NSGraphicsContext currentContext]
setImageInterpolation:NSImageInterpolationHigh];
@@ -195,6 +196,7 @@
[transform translateXBy:(shadowBlurRadius - shadowOffset.width) /
scale yBy:(shadowBlurRadius - shadowOffset.height) / scale];
[transform concat];
}
+
[self drawWithBox:box];
if (NSIsEmptyRect(readingBarRect) == NO) {
[[NSUnarchiver unarchiveObjectWithData:[[NSUserDefaults
standardUserDefaults] objectForKey:SKReadingBarColorKey]] setFill];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit