Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileTreeContextMenu_Opening: Handle null revision #10684

Merged
merged 1 commit into from Jan 28, 2023

Conversation

mstv
Copy link
Member

@mstv mstv commented Jan 27, 2023

Fixes #10666

Proposed changes

  • FileTreeContextMenu_Opening: Replace Validates.NotNull(_revision) with null-aware code
  • ShouldEnableFirstItemDiff handle null
  • Disable filterFileInGridToolStripMenuItem, too, if there is no selection
  • Replace var by explicit types

Screenshots

Before

NRE

After

image

Test methodology

  • manual

Test environment(s)

  • Git Extensions 33.33.33
  • Build 450e4c0
  • Git 2.39.0.windows.1
  • Microsoft Windows NT 10.0.19045.0
  • .NET 6.0.12
  • DPI 96dpi (no scaling)
  • Microsoft.WindowsDesktop.App Versions
    Microsoft.WindowsDesktop.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Merge strategy

I agree that the maintainer squash merge this PR (if the commit message is clear).


✒️ I contribute this code under The Developer Certificate of Origin.

@mstv mstv self-assigned this Jan 27, 2023
@mstv mstv merged commit 5253414 into gitextensions:master Jan 28, 2023
@mstv mstv deleted the fix/i10666_empty_filetree branch January 28, 2023 21:52
@ghost ghost added this to the vNext milestone Jan 28, 2023
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.

[NBug] Value must not be null.
3 participants