Fixed: <rdar://problem/
3936879> nil-deref, crash in InlineFlowBox::nodeAtPoint closing DHTML menus at hrweb.apple.com
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::fillInlineSelectionGaps): Added a nil check. If there is no selection, don't try to get the selection's containing block. If we do, we'll crash.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8299
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-01-04 Kevin Decker <kdecker@apple.com>
+
+ Reviewed by Hyatt.
+
+ Fixed: <rdar://problem/3936879> nil-deref, crash in InlineFlowBox::nodeAtPoint closing DHTML menus at hrweb.apple.com
+
+ * khtml/rendering/render_block.cpp:
+ (khtml::RenderBlock::fillInlineSelectionGaps): Added a nil check. If there is no selection, don't try to get the selection's containing block. If we do, we'll crash.
+
2005-01-04 David Hyatt <hyatt@apple.com>
Fix for 3937203, force an update of the dashboard regions when scrollbars are added/removed.
GapRects result;
RenderObject* selStart = canvas()->selectionStart();
- bool containsStart = (selStart == this) || (selStart->containingBlock() == this);
+ // If there is no selection, don't try to get the selection's containing block.
+ // If we do, we'll crash.
+ bool containsStart = (selStart && (selStart == this || selStart->containingBlock() == this));
if (!firstLineBox()) {
if (containsStart) {