Skip to content

Commit

Permalink
fix node handle creation
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas committed Dec 18, 2015
1 parent 5b9b8f0 commit 5f111ba
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rmw_fastrtps_cpp/src/functions.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "rmw/allocators.h"
#include <rmw/rmw.h>
#include <rmw/error_handling.h>
#include <rosidl_typesupport_introspection_cpp/identifier.hpp>
Expand Down Expand Up @@ -279,7 +280,11 @@ extern "C"
return NULL;
}

rmw_node_t *node_handle = new rmw_node_t;
rmw_node_t * node_handle = rmw_node_allocate();
if (!node_handle) {
RMW_SET_ERROR_MSG("failed to allocate rmw_node_t");
return NULL;
}
node_handle->implementation_identifier = eprosima_fastrtps_identifier;
node_handle->data = participant;

Expand Down

0 comments on commit 5f111ba

Please sign in to comment.