Changeset 268:401102f16a42


Ignore:
Timestamp:
04/08/11 13:41:01 (12 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
Phase:
public
Message:

Avoid crash when key-down & key-up pairs are split across scenes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/levelscene.py

    r265 r268  
    205205            if ev.key in self._fast_key_map:
    206206                self._fast_keys_down.discard(ev.key)
    207             if time.time() - self._last_keydown_time < constants.DOUBLE_TAP_TIME and self._last_keys_down and ev.key == self._last_keys_down[-1]:
     207            if self._last_keydown_time and self._last_keys_down and time.time() - self._last_keydown_time < constants.DOUBLE_TAP_TIME and ev.key == self._last_keys_down[-1]:
    208208                self._last_keyup_time = time.time()
    209209                # Still in possible sequence
Note: See TracChangeset for help on using the changeset viewer.