bug 678189 - add IsDefunct() check to accNavigate r=surkov, davidb
authorTrevor Saunders <trev.saunders@gmail.com>
Thu, 11 Aug 2011 13:05:35 -0700
changeset 74297 febd4e26179c8780758a75c22e0fdbf30aa0f665
parent 74296 5f27c21fe7f036418e32379713a47d4772ce65ae
child 74298 1f84f5eb5079bffc321c115f167db8402841de8e
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
reviewerssurkov, davidb
bugs678189
milestone8.0a1
bug 678189 - add IsDefunct() check to accNavigate r=surkov, davidb
accessible/src/msaa/nsAccessibleWrap.cpp
--- a/accessible/src/msaa/nsAccessibleWrap.cpp
+++ b/accessible/src/msaa/nsAccessibleWrap.cpp
@@ -802,18 +802,21 @@ STDMETHODIMP nsAccessibleWrap::accLocati
 }
 
 STDMETHODIMP nsAccessibleWrap::accNavigate(
       /* [in] */ long navDir,
       /* [optional][in] */ VARIANT varStart,
       /* [retval][out] */ VARIANT __RPC_FAR *pvarEndUpAt)
 {
 __try {
+  if (!pvarEndUpAt)
+    return E_INVALIDARG;
+
   nsAccessible *xpAccessibleStart = GetXPAccessibleFor(varStart);
-  if (!xpAccessibleStart)
+  if (!xpAccessibleStart || IsDefunct())
     return E_FAIL;
 
   VariantInit(pvarEndUpAt);
 
   nsCOMPtr<nsIAccessible> xpAccessibleResult;
   PRUint32 xpRelation = 0;
 
   switch(navDir) {