- fixed <rdar://problem/
4058740> Crash (nil-deref) editing Mail reply
message in KWQKHTMLPart::fontForSelection (MailViewer-723)
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::fontForSelection):
Add nil check to loop. It shouldn't be necessary, but this crash trace seems to be
running into it. We're not completely certain, but the check is harmless at worst.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8932
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-03-19 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Darin.
+
+ - fixed <rdar://problem/4058740> Crash (nil-deref) editing Mail reply
+ message in KWQKHTMLPart::fontForSelection (MailViewer-723)
+
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::fontForSelection):
+ Add nil check to loop. It shouldn't be necessary, but this crash trace seems to be
+ running into it. We're not completely certain, but the check is harmless at worst.
+
=== Safari-408 ===
2005-03-18 David Harrison <harrison@apple.com>
NodeImpl *startNode = range->editingStartPosition().node();
if (startNode != nil) {
NodeImpl *pastEnd = range->pastEndNode();
- for (NodeImpl *n = startNode; n != pastEnd; n = n->traverseNextNode()) {
+ // In the loop below, n should eventually match pastEnd and not become nil, but we've seen at least one
+ // unreproducible case where this didn't happen, so check for nil also.
+ for (NodeImpl *n = startNode; n && n != pastEnd; n = n->traverseNextNode()) {
RenderObject *renderer = n->renderer();
if (!renderer)
continue;