render: clear task lists when changing node

This commit is contained in:
itsmattkc
2022-05-28 10:27:28 -07:00
parent 6a65c0fa38
commit 15087b2cd2
+2
View File
@@ -739,12 +739,14 @@ void PreviewAutoCacher::SetViewerNode(ViewerOutput *viewer_node)
if (!video_tasks_.isEmpty()) {
// Cancel any video tasks and wait for them to finish
CancelVideoTasks(true);
video_tasks_.clear();
}
// Handle audio rendering tasks
if (!audio_tasks_.isEmpty()) {
// Cancel any audio tasks and wait for them to finish
CancelAudioTasks(true);
audio_tasks_.clear();
}
// Clear iterators