TISTUD-5221: handle the potential NPE when the project is disconnected f...

...rom git.