Skip to content

Fix exception in OutputConfig Input Actions#2746

Merged
DocMoebiuz merged 2 commits intomainfrom
2745/fix-exception
Feb 23, 2026
Merged

Fix exception in OutputConfig Input Actions#2746
DocMoebiuz merged 2 commits intomainfrom
2745/fix-exception

Conversation

@DocMoebiuz
Copy link
Copy Markdown
Collaborator

fixes #2745

@github-actions
Copy link
Copy Markdown

Build for this pull request:
MobiFlightConnector.zip

Copilot AI review requested due to automatic review settings February 23, 2026 15:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes a NullReferenceException that occurred when executing OutputConfig items with InputActions when the Controller is null. The issue arose from improper null handling in serial number validation.

Changes:

  • Replaced unsafe serial.IndexOf("SN") != 0 check with null-safe SerialNumber.IsArcazeSerial(serial) method
  • Added comprehensive unit test to prevent regression of this bug

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
MobiFlight/Execution/ConfigItemExecutor.cs Fixed NullReferenceException by using null-safe SerialNumber.IsArcazeSerial() method instead of direct IndexOf() call
MobiFlightUnitTests/MobiFlight/Execution/ConfigItemExecutorTests.cs Added test case to verify no exception is thrown when Controller is null with InputAction DeviceType

@github-actions
Copy link
Copy Markdown

Build for this pull request:
MobiFlightConnector.zip

@DocMoebiuz DocMoebiuz added the bug_beta Something isn't working in a beta version, not in a stable released version label Feb 23, 2026
@DocMoebiuz DocMoebiuz merged commit f102679 into main Feb 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug_beta Something isn't working in a beta version, not in a stable released version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error during execution: Object reference not set to an instance

2 participants