VcsBase: Fix potential null pointer access.

Change-Id: I446524500b13c98edeb64e9af7d1d3390327b913
Reviewed-by: Orgad Shaneh <orgads@gmail.com>