diff --git a/lib/dtsc.cpp b/lib/dtsc.cpp index e1a2ef0b..2e9690b0 100644 --- a/lib/dtsc.cpp +++ b/lib/dtsc.cpp @@ -34,6 +34,9 @@ void DTSC::Stream::deletionCallback(livePos deleting){} /// Returns the time in milliseconds of the last received packet. /// This is _not_ the time this packet was received, only the stored time. unsigned int DTSC::Stream::getTime(){ + if ( !buffers.size()){ + return 0; + } return buffers.rbegin()->second["time"].asInt(); }