[iOS] getAssistedNodeInformation crashes getting the bounding box if it doesn't have...
[WebKit-https.git] / Source / WebKit2 / WebProcess / WebPage / ios / WebPageIOS.mm
index 2e6edff8ce56d104258d8f2b7dbed41e0bd1869d..5fbae4c09ac4b2d457314d9217145e5556d739bf 100644 (file)
@@ -1682,7 +1682,10 @@ void WebPage::focusNextAssistedNode(bool isForward)
 
 void WebPage::getAssistedNodeInformation(AssistedNodeInformation& information)
 {
-    information.elementRect = m_page->focusController().focusedOrMainFrame().view()->contentsToRootView(m_assistedNode->renderer()->absoluteBoundingBoxRect());
+    if (RenderObject* renderer = m_assistedNode->renderer())
+        information.elementRect = m_page->focusController().focusedOrMainFrame().view()->contentsToRootView(renderer->absoluteBoundingBoxRect());
+    else
+        information.elementRect = IntRect();
     information.minimumScaleFactor = m_viewportConfiguration.minimumScale();
     information.maximumScaleFactor = m_viewportConfiguration.maximumScale();
     information.hasNextNode = hasFocusableElement(m_assistedNode.get(), m_page.get(), true);