Skip to content

Commit

Permalink
/topic_tools/mux: do not dereference the end-iterator (#1579)
Browse files Browse the repository at this point in the history
  • Loading branch information
cwecht authored and dirk-thomas committed Aug 3, 2020
1 parent 32e1ebe commit 31b76d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/topic_tools/src/mux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ void in_cb(const boost::shared_ptr<ShapeShifter const>& msg,
}
}

if (s != g_selected->msg)
if (g_selected == g_subs.end() || s != g_selected->msg)
return;

// If we're in lazy subscribe mode, and nobody's listening, then unsubscribe
Expand Down

0 comments on commit 31b76d3

Please sign in to comment.