https://bugs.webkit.org/show_bug.cgi?id=120300
Patch by Lukasz Gajowy <l.gajowy@samsung.com> on 2013-08-28
Reviewed by Chris Fleizach.
Added a check if newObj is not null and an assert in order to avoid dereferecing null pointer.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::getOrCreate):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154767
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-08-28 Lukasz Gajowy <l.gajowy@samsung.com>
+
+ AX:Null pointer may be dereferenced.
+ https://bugs.webkit.org/show_bug.cgi?id=120300
+
+ Reviewed by Chris Fleizach.
+
+ Added a check if newObj is not null and an assert in order to avoid dereferecing null pointer.
+
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::getOrCreate):
+
2013-08-28 Pratik Solanki <psolanki@apple.com>
Document::elementSheet() should return a reference
// Will crash later if we have two objects for the same widget.
ASSERT(!get(widget));
-
+
+ // Catch the case if an (unsupported) widget type is used. Only FrameView and ScrollBar are supported now.
+ ASSERT(newObj);
+ if (!newObj)
+ return 0;
+
getAXID(newObj.get());
m_widgetObjectMapping.set(widget, newObj->axObjectID());