Skip to content

Commit

Permalink
Screen explorer/object coordinates: return early if no location is pr…
Browse files Browse the repository at this point in the history
…ovided. Re nvaccess#2559.

In some cases, obj.location is None, which means TypeError is raised because there's nothing to iterate ovdr. Thus, for cases like this, do not play coordinate beep.
  • Loading branch information
josephsl committed Jun 27, 2018
1 parent eed2f8f commit f3199df
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/screenExplorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def playObjectCoordinates(obj):
@param obj: the object for which the coordinates should be played
@type obj: NVDAObjects.NvDAObject
"""
if obj.location is None:
return
l,t,w,h=obj.location
x = l+(w/2)
y = t+(h/2)
Expand Down

0 comments on commit f3199df

Please sign in to comment.