From 8ae652eb16d04f6992fc1f28be7b47f7d40017dd Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sun, 4 Jun 2017 03:28:49 +0200 Subject: [PATCH] Fix up 0cf394dd --- src/insets/InsetGraphics.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/insets/InsetGraphics.cpp b/src/insets/InsetGraphics.cpp index 16a482f10c..335c92d626 100644 --- a/src/insets/InsetGraphics.cpp +++ b/src/insets/InsetGraphics.cpp @@ -947,11 +947,9 @@ string InsetGraphics::prepareHTMLFile(OutputParams const & runparams) const docstring InsetGraphics::xhtml(XHTMLStream & xs, OutputParams const & op) const { - string const output_file; - if (!op.dryrun) - prepareHTMLFile(op); + string const output_file = op.dryrun ? string() : prepareHTMLFile(op); - if (output_file.empty()) { + if (output_file.empty() && !op.dryrun) { LYXERR0("InsetGraphics::xhtml: Unable to prepare file `" << params().filename << "' for output. File missing?"); string const attr = "src='" + params().filename.absFileName() -- 2.39.2