]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
robofsm: Movehelper - fix error when using move_by
authorPetr Silhavik <silhavik.p@gmail.com>
Fri, 1 Mar 2013 12:20:15 +0000 (13:20 +0100)
committerPetr Silhavik <silhavik.p@gmail.com>
Fri, 1 Mar 2013 12:20:15 +0000 (13:20 +0100)
src/robofsm/movehelper.cc

index 82883c40b7ee1b508e85f1cc3836adceb12844f4..3ef45e8ca06835de37cce5d1e739af288c0cf9e9 100644 (file)
@@ -217,7 +217,7 @@ void MoveHelper::move_by(double distance, move_target_heading heading, Trajector
        target->heading = heading;
        target->trajectory = t;
        robot.sched.queue_event(robot.MOTION, new evNewTarget(target));
-       delete t;
+       t = NULL;
 }
 
 move_target_heading MoveHelper::trans_heading(move_target_heading h) {