We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bb65717 + 1bc6294 commit b39ab21Copy full SHA for b39ab21
rclcpp/include/rclcpp/executors/events_executor.hpp
@@ -187,6 +187,11 @@ class EventsExecutor : public rclcpp::Executor
187
static void
188
push_event(const void * executor_ptr, rmw_listener_event_t event)
189
{
190
+ // Check if the executor pointer is not valid
191
+ if (!executor_ptr) {
192
+ throw std::runtime_error("The executor pointer is not valid.");
193
+ }
194
+
195
// Cast executor_ptr to this (need to remove constness)
196
auto this_executor = const_cast<executors::EventsExecutor *>(
197
static_cast<const executors::EventsExecutor *>(executor_ptr));
0 commit comments