commit 8d882e662be240a48bf05f0b88f7c03d529248f3
Author: Jean-Marc <lasgout...@lyx.org>
Date:   Wed Mar 4 22:46:48 2015 +0100

    Add test for null buffer
    
    This is actually not needed in practice.
    
    Fixes coverity issue 23306.

diff --git a/src/Converter.cpp b/src/Converter.cpp
index 1e02637..4fa740e 100644
--- a/src/Converter.cpp
+++ b/src/Converter.cpp
@@ -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()));
 

Reply via email to