Skip to content

Commit

Permalink
bug fix - optimize disabled events - keep zombies underground
Browse files Browse the repository at this point in the history
  • Loading branch information
esseff committed Sep 19, 2019
1 parent de81e85 commit ac9cfe5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions include/omc/Event.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ class BaseEvent
void clean()
{
assert(event_queue);
if ( is_zombie && in_queue ) {
event_queue->erase( this );
in_queue = false;
if ( is_zombie ) {
if (in_queue) {
event_queue->erase(this);
in_queue = false;
}
}
else if ( is_dirty ) {
Time new_event_time = call_time_func();
Expand Down

0 comments on commit ac9cfe5

Please sign in to comment.