Index: Source/core/editing/Caret.cpp |
diff --git a/Source/core/editing/Caret.cpp b/Source/core/editing/Caret.cpp |
index eb81c803c6eeb0d0e8ae7a16b6156f3e2ec289be..fce2545c25cf6c0ac89187ca5465b0cb6fd2b1f3 100644 |
--- a/Source/core/editing/Caret.cpp |
+++ b/Source/core/editing/Caret.cpp |
@@ -209,8 +209,11 @@ void CaretBase::repaintCaretForLocalRect(Node* node, const LayoutRect& rect) |
bool CaretBase::shouldRepaintCaret(const RenderView* view, bool isContentEditable) const |
{ |
ASSERT(view); |
- Frame* frame = view->frameView() ? view->frameView()->frame() : 0; // The frame where the selection started. |
- bool caretBrowsing = frame && frame->settings() && frame->settings()->caretBrowsingEnabled(); |
+ bool caretBrowsing = false; |
+ if (FrameView* frameView = view->frameView()) { |
+ Frame& frame = frameView->frame(); // The frame where the selection started |
+ caretBrowsing = frame.settings() && frame.settings()->caretBrowsingEnabled(); |
+ } |
return (caretBrowsing || isContentEditable); |
} |