From b41f6483040a4269f2761648f5fa528ca602df5d Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Mon, 10 Jan 2011 13:31:24 -0500 Subject: selectBestAt missing another null check bug:3334943 Change-Id: I0183634bfbe64b145edafcc84f42e213509cbc2c --- WebKit/android/nav/WebView.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'WebKit/android/nav/WebView.cpp') diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index a7a48cb..390879a 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -910,8 +910,7 @@ void selectBestAt(const WebCore::IntRect& rect) if (!node) { DBG_NAV_LOGD("no nodes found root=%p", root); m_viewImpl->m_hasCursorBounds = false; - if (root) - root->setCursor(0, 0); + root->setCursor(0, 0); viewInvalidate(); } else { DBG_NAV_LOGD("CachedNode:%p (%d)", node, node->index()); @@ -923,6 +922,8 @@ void selectBestAt(const WebCore::IntRect& rect) const_cast(node)); } sendMoveMouseIfLatest(false); + if (!node) + return; sendMoveSelection((WebCore::Frame*) frame->framePointer(), (WebCore::Node*) node->nodePointer()); } -- cgit v1.1