Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch LookupError when getting NVDAObject from offset in virtual buffers #8665

Merged
merged 1 commit into from
Sep 4, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion source/virtualBuffers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,11 @@ def _getPointFromOffset(self,offset):
return textInfos.Point(left + width / 2, top + height / 2)

def _getNVDAObjectFromOffset(self,offset):
docHandle,ID=self._getFieldIdentifierFromOffset(offset)
try:
docHandle,ID=self._getFieldIdentifierFromOffset(offset)
except LookupError:
log.debugWarning("Couldn't get NVDAObject from offset %d" % offset)
return None
return self.obj.getNVDAObjectFromIdentifier(docHandle,ID)

def _getOffsetsFromNVDAObjectInBuffer(self,obj):
Expand Down