From: andersca Date: Thu, 16 Nov 2006 19:49:12 +0000 (+0000) Subject: Reviewed by Tim. X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=63d8d9bcfdb32345c56c32728aa57474ebf77f58 Reviewed by Tim. REGRESSION: Crash in WebCore::Range::boundaryPointsValid when replying to a mail Message * Misc/WebNSAttributedStringExtras.m: (+[NSAttributedString _web_attributedStringFromRange:]): If the range passed in is null, return null. When this function was in the bridge, it would never get called with a null range when nothing was selected. Instead, the range would just have invalid boundary points. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17813 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog index 47ac1cd3171c..fc7c671eb47d 100644 --- a/WebKit/ChangeLog +++ b/WebKit/ChangeLog @@ -1,3 +1,15 @@ +2006-11-16 Anders Carlsson + + Reviewed by Tim. + + + REGRESSION: Crash in WebCore::Range::boundaryPointsValid when replying to a mail Message + + * Misc/WebNSAttributedStringExtras.m: + (+[NSAttributedString _web_attributedStringFromRange:]): + If the range passed in is null, return null. When this function was in the bridge, it would never get called + with a null range when nothing was selected. Instead, the range would just have invalid boundary points. + 2006-11-15 Adam Roben Reviewed by Anders. diff --git a/WebKit/Misc/WebNSAttributedStringExtras.m b/WebKit/Misc/WebNSAttributedStringExtras.m index c3be170f13b6..e9beef8a73cf 100644 --- a/WebKit/Misc/WebNSAttributedStringExtras.m +++ b/WebKit/Misc/WebNSAttributedStringExtras.m @@ -157,7 +157,7 @@ static NSFileWrapper *fileWrapperForElement(Element* e) NSMutableAttributedString *result; BEGIN_BLOCK_OBJC_EXCEPTIONS; - if (!range->boundaryPointsValid()) + if (!range || !range->boundaryPointsValid()) return nil; Node* firstNode = range->startNode();