The check_clock_gate() was trying to access to the first event in all streams. However, streams that are empty don't have any event, so they cause a NULL dereference. Skipping not active streams avoids the problem.
The check_clock_gate() was trying to access to the first event in all streams. However, streams that are empty don't have any event, so they cause a NULL dereference. Skipping not active streams avoids the problem.