Skip to content

fix(controls): Fix NullReferenceException in Arc#1644

Merged
pomianowski merged 1 commit intolepoco:mainfrom
Nuklon:patch-15
Jan 13, 2026
Merged

fix(controls): Fix NullReferenceException in Arc#1644
pomianowski merged 1 commit intolepoco:mainfrom
Nuklon:patch-15

Conversation

@Nuklon
Copy link
Copy Markdown
Collaborator

@Nuklon Nuklon commented Jan 12, 2026

Pull request type

Please check the type of change your PR introduces:

  • Update
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes

What is the current behavior?

Arc can throw an NRE under the right circumstances caused by creating a new Pen attached to the Stroke brush in OnRender(DrawingContext) every frame. Removing OnRender(DrawingContext) and letting the base Shape class handle rendering fixes this. Basically remove a lot of code and let WPF handle everything.

ProgressRing tested and it's working fine.

Wpf.Ui.Gallery_QFzUrwn8xN.mp4

@Nuklon Nuklon requested a review from pomianowski as a code owner January 12, 2026 15:44
@github-actions github-actions Bot added controls Changes to the appearance or logic of custom controls. PR Pull request dotnet release labels Jan 12, 2026
@pomianowski pomianowski merged commit fc1aafc into lepoco:main Jan 13, 2026
2 checks passed
@pomianowski pomianowski changed the title feat(controls): Fix NullReferenceException in Arc fix(controls): Fix NullReferenceException in Arc Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

controls Changes to the appearance or logic of custom controls. dotnet PR Pull request release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants