diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-08-12 16:12:54 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-08-12 16:12:54 +0200 |
commit | 7df12958bed6544b36bc946cdbb185ff2011733c (patch) | |
tree | bea86d2301dfb0349f852272b00b382843c38f91 | |
parent | 21ffec315b8fa8a6b46351021da915236148a7b1 (diff) | |
download | MusicSampler-7df12958bed6544b36bc946cdbb185ff2011733c.tar.gz MusicSampler-7df12958bed6544b36bc946cdbb185ff2011733c.tar.zst MusicSampler-7df12958bed6544b36bc946cdbb185ff2011733c.zip |
Fix crash when click on unconfigured key
-rw-r--r-- | music_sampler/key.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/music_sampler/key.py b/music_sampler/key.py index 983c5a6..ce2f45b 100644 --- a/music_sampler/key.py +++ b/music_sampler/key.py | |||
@@ -290,8 +290,9 @@ class Key(ButtonBehavior, Widget): | |||
290 | # Helpers | 290 | # Helpers |
291 | @property | 291 | @property |
292 | def repeat_delay(self): | 292 | def repeat_delay(self): |
293 | if 'repeat_delay' in self.key.config['properties']: | 293 | if hasattr(self, 'config') and\ |
294 | return self.key.config['properties']['repeat_delay'] | 294 | 'repeat_delay' in self.config['properties']: |
295 | return self.config['properties']['repeat_delay'] | ||
295 | else: | 296 | else: |
296 | return 0 | 297 | return 0 |
297 | 298 | ||