Fixed a bug in my dijkstra implementation

Previously, if there were any vertices that couldn't be reached
under any circumstances the program would crash. Such a scenario
could occur if two grown obstacles overlapped.