Check if process is running.
authorueno <ueno>
Wed, 26 Apr 2006 02:54:46 +0000 (02:54 +0000)
committerueno <ueno>
Wed, 26 Apr 2006 02:54:46 +0000 (02:54 +0000)
epg.el

diff --git a/epg.el b/epg.el
index b214859..e7e4e6a 100644 (file)
--- a/epg.el
+++ b/epg.el
@@ -1036,7 +1036,8 @@ You can then use `write-region' to write new data into the file."
 
 ;;;###autoload
 (defun epg-cancel (context)
-  (delete-process (epg-context-process context)))
+  (if (eq (process-status (epg-context-process context)) 'run)
+      (delete-process (epg-context-process context))))
   
 ;;;###autoload
 (defun epg-start-decrypt (context cipher)