Index: src/orca/default.py
===================================================================
--- src/orca/default.py	(revision 3793)
+++ src/orca/default.py	(working copy)
@@ -2801,8 +2801,9 @@
             # selection state to the user. See bug #523235 for more details.
             #
             if checkIfSelected == True and \
+               (orca_state.lastNonModifierKeyEvent and \
                (orca_state.lastNonModifierKeyEvent.event_string == "Left" or \
-               orca_state.lastNonModifierKeyEvent.event_string == "Right"):
+               orca_state.lastNonModifierKeyEvent.event_string == "Right")):
                 checkIfSelected = False
 
             if objRole == pyatspi.ROLE_ICON and \
