git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Kernel - Fixing bugs exposed with `qemu -nographic`
[tpg/acess2.git]
/
KernelLand
/
Modules
/
Input
/
Keyboard
/
main.c
diff --git
a/KernelLand/Modules/Input/Keyboard/main.c
b/KernelLand/Modules/Input/Keyboard/main.c
index
f49d8ea
..
9c2e20e
100644
(file)
--- a/
KernelLand/Modules/Input/Keyboard/main.c
+++ b/
KernelLand/Modules/Input/Keyboard/main.c
@@
-164,6
+164,15
@@
void Keyboard_HandleKey(tKeyboard *Source, Uint32 HIDKeySym)
Uint32 flag;
Uint8 layer;
Uint32 flag;
Uint8 layer;
+ if( !Source ) {
+ Log_Error("Keyboard", "Passed NULL handle");
+ return ;
+ }
+ if( !Source->Node ) {
+ Log_Error("Keyboard", "Passed handle with NULL node");
+ return ;
+ }
+
bPressed = !(HIDKeySym & (1 << 31));
HIDKeySym &= 0x7FFFFFFF;
bPressed = !(HIDKeySym & (1 << 31));
HIDKeySym &= 0x7FFFFFFF;
UCC
git Repository :: git.ucc.asn.au