Index: ui/views/accessibility/native_view_accessibility_win.cc |
diff --git a/ui/views/accessibility/native_view_accessibility_win.cc b/ui/views/accessibility/native_view_accessibility_win.cc |
index bf7cc645e872b00d9968162c9f55d9b47ac57eb1..023e31188e3b86e52d0cf58b05195f8c031d2b2f 100644 |
--- a/ui/views/accessibility/native_view_accessibility_win.cc |
+++ b/ui/views/accessibility/native_view_accessibility_win.cc |
@@ -529,8 +529,12 @@ STDMETHODIMP NativeViewAccessibilityWin::get_accChild(VARIANT var_child, |
} |
*disp_child = child_view->GetNativeViewAccessible(); |
- (*disp_child)->AddRef(); |
- return S_OK; |
+ if (*disp_child) { |
+ (*disp_child)->AddRef(); |
+ return S_OK; |
+ } |
+ |
+ return E_FAIL; |
} |
STDMETHODIMP NativeViewAccessibilityWin::get_accChildCount(LONG* child_count) { |