File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -184,8 +184,10 @@ void SmacPlanner2D::cleanup()
184184 _name.c_str ());
185185 _a_star.reset ();
186186 _smoother.reset ();
187- _costmap_downsampler->on_cleanup ();
188- _costmap_downsampler.reset ();
187+ if (_costmap_downsampler) {
188+ _costmap_downsampler->on_cleanup ();
189+ _costmap_downsampler.reset ();
190+ }
189191 _raw_plan_publisher.reset ();
190192}
191193
Original file line number Diff line number Diff line change @@ -221,8 +221,10 @@ void SmacPlannerHybrid::cleanup()
221221 _name.c_str ());
222222 _a_star.reset ();
223223 _smoother.reset ();
224- _costmap_downsampler->on_cleanup ();
225- _costmap_downsampler.reset ();
224+ if (_costmap_downsampler) {
225+ _costmap_downsampler->on_cleanup ();
226+ _costmap_downsampler.reset ();
227+ }
226228 _raw_plan_publisher.reset ();
227229}
228230
You can’t perform that action at this time.
0 commit comments