From 5ea6de59a111520bfea2874fb1883eb037839ca5 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 23 Jul 2008 13:41:39 -0700 Subject: [PATCH] Protect call to dvipng. --- lisp/org.el | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 5b3a1e419..c5f68da88 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -12417,13 +12417,15 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." (cd dir)) (if (not (file-exists-p dvifile)) (progn (message "Failed to create dvi file from %s" texfile) nil) - (call-process "dvipng" nil nil nil - "-E" "-fg" fg "-bg" bg - "-D" dpi - ;;"-x" scale "-y" scale - "-T" "tight" - "-o" pngfile - dvifile) + (condition-case nil + (call-process "dvipng" nil nil nil + "-E" "-fg" fg "-bg" bg + "-D" dpi + ;;"-x" scale "-y" scale + "-T" "tight" + "-o" pngfile + dvifile) + (error nil)) (if (not (file-exists-p pngfile)) (progn (message "Failed to create png file from %s" texfile) nil) ;; Use the requested file name and clean up