From c63f57a0911919f6b8494c04deed525177300f36 Mon Sep 17 00:00:00 2001 From: Petr Silhavik Date: Tue, 26 Feb 2013 17:40:12 +0100 Subject: [PATCH] robofsm: fix problem with memory --- src/robofsm/common-states.h | 2 +- src/robofsm/movehelper.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/robofsm/common-states.h b/src/robofsm/common-states.h index a61d9863..1d8fbcec 100644 --- a/src/robofsm/common-states.h +++ b/src/robofsm/common-states.h @@ -288,7 +288,7 @@ struct move_around : TimedSimpleState { } sc::result react(const evMotionError&) { // DBG_PRINT_EVENT("can not access survey point"); - return discard_event(); + return transit(); } typedef mpl::list< sc::transition, diff --git a/src/robofsm/movehelper.cc b/src/robofsm/movehelper.cc index b39e79b6..4ab7520a 100644 --- a/src/robofsm/movehelper.cc +++ b/src/robofsm/movehelper.cc @@ -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) { -- 2.39.2