diff --git a/lib/scripts/legacy_lyxpreview2ppm.py b/lib/scripts/legacy_lyxpreview2ppm.py index fdc5a8eec3..d16e86788f 100644 --- a/lib/scripts/legacy_lyxpreview2ppm.py +++ b/lib/scripts/legacy_lyxpreview2ppm.py @@ -293,6 +293,8 @@ def legacy_conversion_step1(latex_file, dpi, output_format, fg_color, bg_color, # Compile the latex file. latex_status, latex_stdout = run_latex(latex, latex_file) + if latex_status: + return (latex_status, []) if pdf_output: return legacy_conversion_step3(latex_file, dpi, output_format, True, skipMetrics) diff --git a/lib/scripts/lyxpreview2bitmap.py b/lib/scripts/lyxpreview2bitmap.py index 4a2cddb61f..ace46d21c6 100755 --- a/lib/scripts/lyxpreview2bitmap.py +++ b/lib/scripts/lyxpreview2bitmap.py @@ -409,6 +409,8 @@ def main(argv): # Compile the latex file. latex_status, latex_stdout = run_latex(latex, latex_file, bibtex) + if latex_status: + return (latex_status, []) # The dvi output file name dvi_file = latex_file_re.sub(".dvi", latex_file)