From 2c50f0cd77a96ccfeb48262e7144eadc39ee21f7 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 29 Oct 2021 12:39:50 +0200 Subject: [PATCH] An assert to hopefully please coverity --- src/insets/InsetText.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 626818c607..a4521848c3 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -664,6 +664,8 @@ void InsetText::docbookRenderAsImage(XMLStream & xs, OutputParams const & rp, XH // TODO: no real support for Unicode. This code is very similar to RenderPreview::addPreview, the same gotcha applies. graphics::PreviewLoader* loader = buffer().loader(); + // This should be OK because we are exporting + LASSERT(loader != nullptr, return); loader->add(snippet); loader->startLoading(true); // Generate the image and wait until done. graphics::PreviewImage const * img = loader->preview(snippet); -- 2.39.5