Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion source/NVDAObjects/IAccessible/MSHTML.py
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ def findExtraIAccessibleOverlayClasses(obj, clsList):
clsList.append(MSAATextLeaf)
return

if iaRole == oleacc.ROLE_SYSTEM_WINDOW and obj.event_objectID > 0:
if iaRole == oleacc.ROLE_SYSTEM_WINDOW and obj.event_objectID is not None and obj.event_objectID > 0:
clsList.append(PluginWindow)
elif iaRole == oleacc.ROLE_SYSTEM_CLIENT and obj.event_objectID == winUser.OBJID_CLIENT:
clsList.append(RootClient)
6 changes: 3 additions & 3 deletions source/NVDAObjects/IAccessible/adobeAcrobat.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ def initOverlayClass(self):
log.debugWarning("Could not get IServiceProvider")
return

if self.event_objectID > 0:
if self.event_objectID is not None and self.event_objectID > 0:
self.accID = self.event_objectID
elif self.event_childID > 0:
elif self.event_childID is not None and self.event_childID > 0:
self.accID = self.event_childID
else:
try:
Expand All @@ -84,7 +84,7 @@ def initOverlayClass(self):
def _get_role(self):
try:
return normalizeStdName(self.pdDomNode.GetStdName())[0]
except (AttributeError, LookupError, COMError):
except (AttributeError, LookupError, COMError, TypeError):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means that it will hide any other TypeErrors. I think this should instead log at Debug / Debug warning.

pass

role = super(AcrobatNode, self).role
Expand Down
2 changes: 1 addition & 1 deletion source/virtualBuffers/adobeFlash.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class AdobeFlash(VirtualBuffer):

def __init__(self,rootNVDAObject):
super(AdobeFlash,self).__init__(rootNVDAObject,backendName="adobeFlash")
self.isWindowless = rootNVDAObject.event_objectID > 0
self.isWindowless = rootNVDAObject.event_objectID is not None and rootNVDAObject.event_objectID > 0

def __contains__(self,obj):
if self.isWindowless:
Expand Down