- int size = fp->getNrOfWayPoints();
- //cerr << "Setting pos" << pos << " ";
- //cerr << "setting intentions " ;
- for (int i = 0; i < size; i++) {
- int val = fp->getRouteIndex(i);
- //cerr << val << " ";
- //if ((val) && (val != pos)) {
- //intentions.push_back(val);
- //cerr << "[done ] " << endl;
- //}
+ if (fp) {
+ int size = fp->getNrOfWayPoints();
+ // //cerr << "Setting pos" << pos << " ";
+ // //cerr << "setting intentions " ;
+ for (int i = 0; i < size; i++) {
+ // int val = fp->getRouteIndex(i);
+ //cerr << fp->getWayPoint(i)->getName() << " ";
+ //if ((val) && (val != pos)) {
+ //intentions.push_back(val);
+ //cerr << "[done ] " << endl;
+ //}
+ }