]> git.lyx.org Git - lyx.git/commitdiff
Fix up 0cf394dd
authorEnrico Forestieri <forenr@lyx.org>
Sun, 4 Jun 2017 01:28:49 +0000 (03:28 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Sun, 4 Jun 2017 01:28:49 +0000 (03:28 +0200)
src/insets/InsetGraphics.cpp

index 16a482f10cc598f3c4a2926e35ca8bd2d557319b..335c92d6269c16285e8b24b8f7ea60f59b77af7a 100644 (file)
@@ -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()