AX: CrashTracer: com.apple.WebKit.WebContent at WebCore::AccessibilityRenderObject::remoteSVGRootElement const + 227
https://bugs.webkit.org/show_bug.cgi?id=158685

Reviewed by David Kilzer.

Crash reports show a null access at a line that tries to dereference a pointer.
I still don't have a way to layout test this, as it seems tied to tear down of the main document.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::remoteSVGRootElement):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@202014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index d60b63b..6b7d98e 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2016-06-13  Chris Fleizach  <cfleizach@apple.com>
+
+        AX: CrashTracer: com.apple.WebKit.WebContent at WebCore::AccessibilityRenderObject::remoteSVGRootElement const + 227
+        https://bugs.webkit.org/show_bug.cgi?id=158685
+
+        Reviewed by David Kilzer.
+
+        Crash reports show a null access at a line that tries to dereference a pointer. 
+        I still don't have a way to layout test this, as it seems tied to tear down of the main document.
+
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
+
 2016-06-13  Jeremy Jones  <jeremyj@apple.com>
 
         Use two video layer solution only on mac.
diff --git a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp b/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
index 5199294..69487d9 100644
--- a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
+++ b/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
@@ -3014,7 +3014,7 @@
     // In order to connect the AX hierarchy from the SVG root element from the loaded resource
     // the parent must be set, because there's no other way to get back to who created the image.
     ASSERT(!createIfNecessary || rootSVGObject);
-    if (!is<AccessibilitySVGRoot>(*rootSVGObject))
+    if (!is<AccessibilitySVGRoot>(rootSVGObject))
         return nullptr;
     
     return downcast<AccessibilitySVGRoot>(rootSVGObject);