VcsBase: Do not crash when no project is selected

Task-number: QTCREATORBUG-12242
Change-Id: I96e4ea8a547d3a3a30883efbe41cd63ff624b4c4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>