diff --git a/src/util.cc b/src/util.cc index 7a5eb41c5f..2a6a5c37c4 100644 --- a/src/util.cc +++ b/src/util.cc @@ -1507,13 +1507,11 @@ double current_time(bool real) double t = double(tv.tv_sec) + double(tv.tv_usec) / 1e6; - const iosource::Manager::PktSrcList& pkt_srcs(iosource_mgr->GetPktSrcs()); - - if ( ! pseudo_realtime || real || pkt_srcs.empty() ) + if ( ! pseudo_realtime || real || ! iosource_mgr || iosource_mgr->GetPktSrcs().empty() ) return t; // This obviously only works for a single source ... - iosource::PktSrc* src = pkt_srcs.front(); + iosource::PktSrc* src = iosource_mgr->GetPktSrcs().front(); if ( net_is_processing_suspended() ) return src->CurrentPacketTimestamp();