Skip to content

[release/10.0] Fix Control.Dispose crash when dependent UserControl fails to load due to missing assembly#14398

Open
github-actions[bot] wants to merge 1 commit intorelease/10.0from
backport/pr-13840-to-release/10.0
Open

[release/10.0] Fix Control.Dispose crash when dependent UserControl fails to load due to missing assembly#14398
github-actions[bot] wants to merge 1 commit intorelease/10.0from
backport/pr-13840-to-release/10.0

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Mar 16, 2026

Backport of #13840 to release/10.0
Fixes #14393

Customer Impact

This change ensures that Control.Dispose() can safely execute even when the control was never fully constructed.

Fix

Added a defensive null check around ContextMenuStrip access in Control.Dispose()
Replaced direct property access with Properties?.TryGetValue(...) to ensure safe event unsubscription

Testing

Manual with the customer repro case.

Risk

Low - This fix only adds a defensive null check and will not affect existing logic.

@github-actions github-actions bot requested a review from a team as a code owner March 16, 2026 01:53
@github-actions github-actions bot added the area-DarkMode Issues relating to Dark Mode feature label Mar 16, 2026
@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.11109%. Comparing base (ee90158) to head (60b202d).

Additional details and impacted files
@@                  Coverage Diff                   @@
##           release/10.0      #14398         +/-   ##
======================================================
+ Coverage      77.10644%   77.11109%   +0.00464%     
======================================================
  Files              3273        3273                 
  Lines            645033      645033                 
  Branches          47701       47702          +1     
======================================================
+ Hits             497362      497392         +30     
+ Misses           143989      143964         -25     
+ Partials           3682        3677          -5     
Flag Coverage Δ
Debug 77.11109% <0.00000%> (+0.00464%) ⬆️
integration 18.98850% <0.00000%> (+0.00870%) ⬆️
production 51.93587% <0.00000%> (+0.01042%) ⬆️
test 97.40998% <ø> (ø)
unit 49.35089% <0.00000%> (+0.00764%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-DarkMode Issues relating to Dark Mode feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants