Null pointer dereference with astar when no viable route found

err_msg isn't populated when there is no possible trace from source->target. When a return of -1 occurs, this causes a crash. It shouldn't be returning -1, however, as this is not an error condition.