Fix crash when opening new window from pathbar
This was merged into master as part of !815 (merged).
!815 (merged) has 2 commits, the other isn't applicable to 42.
This was merged into master as part of !815 (merged).
!815 (merged) has 2 commits, the other isn't applicable to 42.