ext: Fix segfault in simulate_limit_event shortcut
In the SST integration the top of the main queue is checked
for an event before starting the simulation.
If the first event is scheduled after the ending tick, we are
just returning the simulate_limit_event without entering
the simulation loop.
If the method is called with an empty queue, the following
line will segfault (getHead() == nullptr):
With this patch we are covering the case where we have
an empty event queue
Signed-off-by: Giacomo Travaglini <firstname.lastname@example.org>
Reviewed-by: Hoa Nguyen <email@example.com>
Reviewed-by: Jason Lowe-Power <firstname.lastname@example.org>
Maintainer: Jason Lowe-Power <email@example.com>
Tested-by: kokoro <firstname.lastname@example.org>
1 file changed