regression: Fix a panic when removing git-containing worktree from the project panel (#15256)
CharlesChen0823
created
Follow-up of #14989
Opening a project with git metadata and clicking "Remove from Project" will panic:

Release Notes:
- N/A