]> rtime.felk.cvut.cz Git - eurobot/public.git/blobdiff - src/robofsm/movehelper.cc
robofsm: fix problem with memory
[eurobot/public.git] / src / robofsm / movehelper.cc
index b39e79b6aa62b80c3d5418c69e1be64f5357b47a..4ab7520afbd3a52bab9cb3cf6bd42d25b3b413dd 100644 (file)
@@ -212,7 +212,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) {