Skip to content

Commit

Permalink
Catch null com pointer access when fetching UIA children for UIA grid…
Browse files Browse the repository at this point in the history
… rows
  • Loading branch information
Leonard de Ruijter committed Mar 28, 2018
1 parent aef52b8 commit ac0c603
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/appModules/outlook.py
Expand Up @@ -451,6 +451,11 @@ def _get_name(self):
# when fetching the length of the cached children array.
childrenCacheRequest.treeFilter=UIAHandler.handler.clientObject.CreatePropertyCondition(UIAHandler.UIA_IsContentElementPropertyId, True)
cachedChildren=self.UIAElement.buildUpdatedCache(childrenCacheRequest).getCachedChildren()
if not cachedChildren:
# GetCachedChildren returns null if there are no children.
# This is unexpected here.
log.debugWarning("Unable to get relevant children for UIAGridRow", exc_info=True)
return super(UIAGridRow, self).name
for index in xrange(cachedChildren.length):
e=cachedChildren.getElement(index)
isFlag = e.cachedClassName=="FlagField"
Expand Down

0 comments on commit ac0c603

Please sign in to comment.