]> git.lyx.org Git - features.git/blobdiff - src/Converter.cpp
Clarify message about an empty file
[features.git] / src / Converter.cpp
index 307eb23e21f62ebd743162bb102290e55dcc51a1..a00b0f49c0043db116c05928251d2f805345f28b 100644 (file)
@@ -455,10 +455,12 @@ bool Converters::convert(Buffer const * buffer,
                        if (!conv.parselog().empty())
                                command += " 2> " + quoteName(infile2 + ".out");
 
-                       if (conv.from() == "dvi" && conv.to() == "ps")
+                       // it is not actually not necessary to test for buffer here,
+                       // but it pleases coverity.
+                       if (buffer && conv.from() == "dvi" && conv.to() == "ps")
                                command = add_options(command,
                                                      buffer->params().dvips_options());
-                       else if (conv.from() == "dvi" && prefixIs(conv.to(), "pdf"))
+                       else if (buffer && conv.from() == "dvi" && prefixIs(conv.to(), "pdf"))
                                command = add_options(command,
                                                      dvipdfm_options(buffer->params()));
 
@@ -660,7 +662,7 @@ bool Converters::runLaTeX(Buffer const & buffer, string const & command,
                Alert::error(_("LaTeX failed"), str);
        } else if ((result & LaTeX::NO_OUTPUT) && !buffer.isClone()) {
                Alert::warning(_("Output is empty"),
-                              _("An empty output file was generated."));
+                              _("No output file was generated."));
        }
 
 
@@ -672,7 +674,6 @@ bool Converters::runLaTeX(Buffer const & buffer, string const & command,
                        LaTeX::NO_OUTPUT;
 
        return (result & ERROR_MASK) == 0;
-
 }