commit 8ae652eb16d04f6992fc1f28be7b47f7d40017dd
Author: Enrico Forestieri <[email protected]>
Date: Sun Jun 4 03:28:49 2017 +0200
Fix up 0cf394dd
---
src/insets/InsetGraphics.cpp | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/insets/InsetGraphics.cpp b/src/insets/InsetGraphics.cpp
index 16a482f..335c92d 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()