diff --git a/src/mtp/model/multithreaded-simulator-impl.cc b/src/mtp/model/multithreaded-simulator-impl.cc index 863149e48..64658d455 100644 --- a/src/mtp/model/multithreaded-simulator-impl.cc +++ b/src/mtp/model/multithreaded-simulator-impl.cc @@ -299,7 +299,11 @@ MultithreadedSimulatorImpl::Partition () } } std::sort (delays.begin (), delays.end ()); - if (delays.size () % 2 == 1) + if (delays.size () == 0) + { + m_minLookahead = TimeStep (0); + } + else if (delays.size () % 2 == 1) { m_minLookahead = delays[delays.size () / 2]; }