Fixed crash when opening a file that's not part of the project