added some checks, this shouldn't be needed with a consistent keymap, but as we don't want to crash in this case ... (could help DarkWyrm)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13692 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
02619f4da6
commit
02bf3b7c13
|
@ -227,7 +227,9 @@ Keymap::IsDeadSecondKey(uint32 keyCode, uint32 modifiers, uint8 activeDeadKey)
|
|||
case B_CONTROL_KEY: offset = fKeys.control_map[keyCode]; break;
|
||||
default: offset = fKeys.normal_map[keyCode]; break;
|
||||
}
|
||||
|
||||
|
||||
if (offset <= 0)
|
||||
return false;
|
||||
uint32 numBytes = fChars[offset];
|
||||
|
||||
if (!numBytes)
|
||||
|
@ -298,7 +300,9 @@ Keymap::GetChars(uint32 keyCode, uint32 modifiers, uint8 activeDeadKey, char** c
|
|||
case B_CONTROL_KEY: offset = fKeys.control_map[keyCode]; break;
|
||||
default: offset = fKeys.normal_map[keyCode]; break;
|
||||
}
|
||||
|
||||
|
||||
if (offset <= 0)
|
||||
return;
|
||||
// here we get the char size
|
||||
*numBytes = fChars[offset];
|
||||
|
||||
|
|
Loading…
Reference in New Issue