[JENKINS-24995] fixed exception when not passing any toollocations

This should fix JENKINS-24995, sorry about that. I've tested with and without toolLocations now.
Might be best to review before I introduce another bug.