Skip to content

Commit

Permalink
fix KeyError when curves are removed concurrently (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas authored Sep 9, 2019
1 parent c2cd1ef commit b8e5cdd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/rqt_plot/data_plot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,11 @@ def _do_redraw(self):
self._merged_autoscale()
for curve_id in self._curves:
curve = self._curves[curve_id]
self._data_plot_widget.set_values(curve_id, curve['x'], curve['y'])
try:
self._data_plot_widget.set_values(curve_id, curve['x'], curve['y'])
except KeyError:
# skip curve which has been removed in the mean time
pass
self._data_plot_widget.redraw()

def _get_curve(self, curve_id):
Expand Down

0 comments on commit b8e5cdd

Please sign in to comment.