Index: Source/core/accessibility/AXObjectCache.cpp |
diff --git a/Source/core/accessibility/AXObjectCache.cpp b/Source/core/accessibility/AXObjectCache.cpp |
index 34d6f630f5cd16646d3f59affaeff7380b60aafb..2590d5e48f3c02da1e1617b1afad687900d46c5f 100644 |
--- a/Source/core/accessibility/AXObjectCache.cpp |
+++ b/Source/core/accessibility/AXObjectCache.cpp |
@@ -343,6 +343,11 @@ AXObject* AXObjectCache::getOrCreate(Widget* widget) |
// 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()); |