Skip to content

Fix null reference crashes for content items with null links - #22

Open
AThraen wants to merge 1 commit into
mainfrom
fix/null-safe-links
Open

AThraen wants to merge 1 commit into
mainfrom
fix/null-safe-links

Conversation

@AThraen

@AThraen AThraen commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Content items that lack a ContentLink or ParentLink previously caused ArgumentNullException / null-dereference crashes during load.

Changes

  • ContentItemEnricher.cs — guard ParentLink/ContentLink lookups before ContainsKey and before inserting into the parent/child maps.
  • ContentTree.razor — filter out null-ContentLink items before ToDictionary (avoids null key), and null-check PageURLSegment before Contains.
  • Overview.razor — null-safe chart grouping (ContentTypeName ?? "Unknown") and empty-collection fallback.

This is a small, isolated hardening change with no behavior change for well-formed packages. Build: 0 errors.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant