Skip to content

Commit c0a7199

Browse files
author
Sebastien Bourdeauducq
committedNov 29, 2011
performance: fix unmapped key handling
1 parent f040ca7 commit c0a7199

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

Diff for: ‎src/gui/performance.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -427,13 +427,15 @@ static void event_callback(mtk_event *e, int count)
427427
index = keycode_to_index(e[i].press.code);
428428
if(index != -1) {
429429
index = keyboard_patches[index];
430-
renderer_add_patch(patches[index].p);
430+
if(index != -1)
431+
renderer_add_patch(patches[index].p);
431432
}
432433
} else if(e[i].type == EVENT_TYPE_RELEASE) {
433434
index = keycode_to_index(e[i].release.code);
434435
if(index != -1) {
435436
index = keyboard_patches[index];
436-
renderer_del_patch(patches[index].p);
437+
if(index != -1)
438+
renderer_del_patch(patches[index].p);
437439
}
438440
} else if(e[i].type == EVENT_TYPE_IR) {
439441
index = e[i].press.code;

0 commit comments

Comments
 (0)