[Bug]: Changing to certain modes in KryptonNavigator can cause a System.NullReferenceException #1580
Labels
area:designer
All issues related to the designer.
area:navigator
All issues to do with the navigator.
bug
Something isn't working
fixed
This issue has been fixed.
version:85-lts
All things to do with V85 LTS.
Milestone
Describe the bug
Using KryptonNavigator and changing to either mode "Stack - CheckButton - HeaderGroup" or "Outlook - Full" will cause a
NullReferenceException.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
To work, no NullReferenceException.
Desktop:
Tested against the following frameworks
Additional context
Investigation of the "Stack - CheckButton - HeaderGroup" NullReferenceException.
Following the code with the debugger showed that you can legitimately end up
at the code below with _headerGroup set to null. Based on the comments in
the code that author was aware of this condition but forgot to add
a null reference check.
Investigation of the "Outlook - Full" NullReferenceException.
This one is a little bit more complicated that the previous bug.
Conceptually the "Outlook - Full" View is created then the Button
Manager is created (in this order due to interdependences between the Button Manager
and the View).
The view creation calls some overridden methods in the base class that eventually
lead to a call to UpdateButtons (but in the case of "Outlook - Full" the
Button Manager has yet be created) and boom!
Again the fix is simply a null reference check.
The text was updated successfully, but these errors were encountered: