浏览代码

Protect call to dvipng.

Carsten Dominik 16 年之前
父节点
当前提交
5ea6de59a1
共有 1 个文件被更改,包括 9 次插入7 次删除
  1. 9 7
      lisp/org.el

+ 9 - 7
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