Refs #1538. Fixed error in events.
Refs #1538. Fixed error in events.

Solved error when the event is destroyed and there are two executions,
one waiting and one running.

eProsima/Fast-DDS,eProsima/Fast-RTPS,eProsima/Fast-DDS,eProsima/Fast-DDS,eProsima/Fast-RTPS,eProsima/Fast-RTPS,eProsima/Fast-RTPS,eProsima/Fast-DDS,eProsima/Fast-DDS,eProsima/Fast-RTPS