From e3649c81f27550741739be40efdb3902e0afaa2a Mon Sep 17 00:00:00 2001 From: Darby Johnston Date: Wed, 21 Feb 2024 10:53:06 -0800 Subject: [PATCH] Background drawing fix --- lib/tlTimelineGL/RenderVideo.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/tlTimelineGL/RenderVideo.cpp b/lib/tlTimelineGL/RenderVideo.cpp index 6da444dd..7b2221fd 100644 --- a/lib/tlTimelineGL/RenderVideo.cpp +++ b/lib/tlTimelineGL/RenderVideo.cpp @@ -22,7 +22,12 @@ namespace tl const timeline::CompareOptions& compareOptions, const timeline::BackgroundOptions& backgroundOptions) { - _drawBackground(boxes, backgroundOptions); + //! \todo Render the background only if there is valid video data and a + //! valid layer? + if (!videoData.empty() && !videoData.front().layers.empty()) + { + _drawBackground(boxes, backgroundOptions); + } switch (compareOptions.mode) { case timeline::CompareMode::A: