From 2f62978adabc201518816ca23a69ab7e7b6cb264 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Tue, 25 Jan 2011 06:19:04 +0000 Subject: =?UTF-8?q?=E2=80=A2=20check=20the=20character=20length=20of=20the?= =?UTF-8?q?=20keyDown=20event=20-=20addresses=20http://log.sequelpro.com/v?= =?UTF-8?q?iew/1948;=20I=20wasn't=20able=20to=20reproduce=20it=20but=20thi?= =?UTF-8?q?s=20fix=20should=20eliminate=20that=20exception?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPWindow.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) { -- cgit v1.2.3