Skip to content

Commit

Permalink
Fix Java null pointer exception
Browse files Browse the repository at this point in the history
  • Loading branch information
gspencergoog committed Oct 27, 2023
1 parent fd13af5 commit adaeb93
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ private boolean handleEventImpl(
output.physicalKey = physicalKey;
output.character = character;
output.synthesized = false;
output.deviceType = KeyData.DeviceType.kKeyboard;

sendKeyEvent(output, onKeyEventHandledCallback);
for (final Runnable postSyncEvent : postSynchronizeEvents) {
Expand All @@ -384,6 +385,7 @@ private void synthesizeEvent(boolean isDown, Long logicalKey, Long physicalKey,
output.physicalKey = physicalKey;
output.character = null;
output.synthesized = true;
output.deviceType = KeyData.DeviceType.kKeyboard;
if (physicalKey != 0 && logicalKey != 0) {
updatePressingState(physicalKey, isDown ? logicalKey : null);
}
Expand Down

0 comments on commit adaeb93

Please sign in to comment.