Avoid NPE in GitPublisher when slave is disconnected

Null pointer exception was reported in jenkins log file after the node
which hosted the preceding build was disconnected.