diff options
author | Bibiko <bibiko@eva.mpg.de> | 2011-01-25 06:19:04 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2011-01-25 06:19:04 +0000 |
commit | 2f62978adabc201518816ca23a69ab7e7b6cb264 (patch) | |
tree | 3c6baab92a0c6e363eb4efbb8befdcacf68011ba | |
parent | c9d3c7688931140090744b29e23c0225259c70b9 (diff) | |
download | sequelpro-2f62978adabc201518816ca23a69ab7e7b6cb264.tar.gz sequelpro-2f62978adabc201518816ca23a69ab7e7b6cb264.tar.bz2 sequelpro-2f62978adabc201518816ca23a69ab7e7b6cb264.zip |
• check the character length of the keyDown event
- addresses http://log.sequelpro.com/view/1948; I wasn't able to reproduce it but this fix should eliminate that exception
-rw-r--r-- | Source/SPWindow.m | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/SPWindow.m b/Source/SPWindow.m index 22f4f4ba..69d3e4a5 100644 --- a/Source/SPWindow.m +++ b/Source/SPWindow.m @@ -37,7 +37,8 @@ */ - (void) sendEvent:(NSEvent *)theEvent { - if ([theEvent type] == NSKeyDown) { + if ([theEvent type] == NSKeyDown && [[theEvent characters] length]) { + unichar theCharacter = [[theEvent charactersIgnoringModifiers] characterAtIndex:0]; switch (theCharacter) { |