mirror of
https://github.com/nasa/trick.git
synced 2025-01-18 02:40:08 +00:00
Add NULL pointer check to remove_event. #545
Added the NULL pointer check and return immediately if the pointer is NULL.
This commit is contained in:
parent
36a91abbc3
commit
d4ffa4002b
@ -178,6 +178,10 @@ int Trick::EventManager::remove_event(Trick::Event * in_event) {
|
||||
|
||||
unsigned int ii , jj ;
|
||||
|
||||
if ( ! in_event ) {
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
if ( in_event->get_before_after() == Trick::EVENT_NOTARGET ) {
|
||||
/* If the event is cyclic, remove the event from the event processor on the event's thread */
|
||||
event_processors[in_event->get_thread()]->remove_event(in_event) ;
|
||||
|
Loading…
Reference in New Issue
Block a user