Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(733)

Unified Diff: ui/views/accessibility/native_view_accessibility_win.cc

Issue 521573003: Fix for a crash in NativeViewAccessibilityWin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698