Should fix the possibility of a seg fault on world generation when making a highway

added a sanity check at the start of the 'A*' subroutine.

in refrence to  Issue #3137