renderer: prevent infinite loop occurring on some time invalidations

This commit is contained in:
itsmattkc
2020-08-26 17:38:16 +10:00
parent 5b00089dd8
commit f86ab6a965
2 changed files with 7 additions and 0 deletions
+4
View File
@@ -148,6 +148,10 @@ void RenderBackend::SetViewerNode(ViewerOutput *viewer_node)
copied_viewer_node_ = static_cast<ViewerOutput*>(viewer_node_->copy());
copy_map_.insert(viewer_node_, copied_viewer_node_);
// We begin an operation and never end it which prevents the copy from unnecessarily
// invalidating its own cache
copied_viewer_node_->BeginOperation();
NodeGraphChanged(viewer_node_->texture_input());
NodeGraphChanged(viewer_node_->samples_input());
ProcessUpdateQueue();
+3
View File
@@ -147,6 +147,9 @@ QString FrameHashCache::GetFormatExtension()
QVector<rational> FrameHashCache::GetFrameListFromTimeRange(TimeRangeList range_list, const rational &timebase)
{
// If timebase is null, this will be an infinite loop
Q_ASSERT(!timebase.isNull());
QVector<rational> times;
while (!range_list.isEmpty()) {