Skip to content

Commit 8d26e0a

Browse files
authored
FIX: Will close debugger input state windows, when the state is no longer valid instead of throwing exceptions. (#801)
1 parent 5d6d596 commit 8d26e0a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ however, it has to be formatted properly to pass verification tests.
1010
## [0.9.5-preview] - 2099-1-1
1111

1212
### Fixed
13+
14+
- Will close debugger input state windows, when the state is no longer valid instead of throwing exceptions.
15+
1316
#### Actions
1417

1518
### Changed

Packages/com.unity.inputsystem/InputSystem/Editor/Internal/InputStateWindow.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,13 @@ public void OnGUI()
159159
if (m_Control == null)
160160
m_ShowRawBytes = true;
161161

162+
// If our state is no longer valid, just close the window.
163+
if (m_StateBuffers == null)
164+
{
165+
Close();
166+
return;
167+
}
168+
162169
GUILayout.BeginHorizontal(EditorStyles.toolbar);
163170
m_ShowRawBytes = GUILayout.Toggle(m_ShowRawBytes, Contents.showRawMemory, EditorStyles.toolbarButton,
164171
GUILayout.Width(150));

0 commit comments

Comments
 (0)