footageviewer: fix infinite loop

Also adds warning to help prevent this from happening again
This commit is contained in:
itsmattkc
2021-09-01 11:31:20 -07:00
parent 5b7255b8bb
commit 6ae368df85
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -291,6 +291,10 @@ TimeRangeListFrameIterator::TimeRangeListFrameIterator(const TimeRangeList &list
index_(-1),
size_(-1)
{
if (!list_.isEmpty() && timebase_.isNull()) {
qCritical() << "TimeRangeListFrameIterator created with null timebase but non-empty list, this will likely lead to infinite loops";
}
UpdateIndexIfNecessary();
}