Skip to content

fix(control): Making titlebarbutton nullable in TitleBar.cs#1681

Closed
dkuaf wants to merge 1 commit intolepoco:mainfrom
dkuaf:feature/nre-titlebar
Closed

fix(control): Making titlebarbutton nullable in TitleBar.cs#1681
dkuaf wants to merge 1 commit intolepoco:mainfrom
dkuaf:feature/nre-titlebar

Conversation

@dkuaf
Copy link
Copy Markdown

@dkuaf dkuaf commented Apr 7, 2026

Nullable check for titlebarbutton

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?

nullref exception when TitleBar.Visibilty = Collapsed

Issue Number: #1670
fixes #1670

What is the new behavior?

early return on null

Other information

n/a

@dkuaf dkuaf requested a review from pomianowski as a code owner April 7, 2026 10:09
@github-actions github-actions bot added controls Changes to the appearance or logic of custom controls. PR Pull request dotnet release titlebar Titlebar updates labels Apr 7, 2026
@luca-domenichini
Copy link
Copy Markdown
Contributor

Hi @dkuaf , there is already #1671 that addresses this issue.
In my PR I made the fewest possible changes in order to address the issue.
Maybe I can merge my PR with your changes too, since it seems they makes sense.
I usually hesitate to make too many changes and prefer to wait for maintainers reaction on first impl.
Drop a comment there if you like.

@dkuaf
Copy link
Copy Markdown
Author

dkuaf commented Apr 7, 2026

Hi @dkuaf , there is already #1671 that addresses this issue. In my PR I made the fewest possible changes in order to address the issue. Maybe I can merge my PR with your changes too, since it seems they makes sense. I usually hesitate to make too many changes and prefer to wait for maintainers reaction on first impl. Drop a comment there if you like.

sorry i did not know that issue had an pr, i did not see a link on the issue to an open PR

i am closing this (i think nullable change make sense)

@dkuaf dkuaf closed this Apr 7, 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 titlebar Titlebar updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TitleBar - NRE when visibility is Collapsed

2 participants