From cfcb9921bc95559ecfd943b37c0f3b18d038e87e Mon Sep 17 00:00:00 2001 From: Nico Date: Sun, 7 May 2023 23:35:15 +0200 Subject: [PATCH] fix: check if keyboard state is null before checking if button is pressed --- src/Ryujinx.Input/Assigner/KeyboardKeyAssigner.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ryujinx.Input/Assigner/KeyboardKeyAssigner.cs b/src/Ryujinx.Input/Assigner/KeyboardKeyAssigner.cs index c66812ba0..0f1db63dd 100644 --- a/src/Ryujinx.Input/Assigner/KeyboardKeyAssigner.cs +++ b/src/Ryujinx.Input/Assigner/KeyboardKeyAssigner.cs @@ -28,7 +28,7 @@ namespace Ryujinx.Input.Assigner public bool ShouldCancel() { - return _keyboardState.IsPressed(Key.Escape); + return _keyboardState?.IsPressed(Key.Escape) == true; } public ButtonValue? GetPressedButton()