about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2015-07-20 12:04:58 +0200
committerhut <hut@lepus.uberspace.de>2015-10-04 01:19:15 +0200
commitbaa866aa2cccdc4b0015e8c80be1178e4a8ea6c9 (patch)
tree921f4da32c265de8054ed16a600bd564996e566d
parent367f15b7e03bd9b00e05fc2bef07b08a06338fd9 (diff)
downloadranger-baa866aa2cccdc4b0015e8c80be1178e4a8ea6c9.tar.gz
ext.img_display: add sanity checks to quit(), fixes #347
-rw-r--r--ranger/ext/img_display.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ranger/ext/img_display.py b/ranger/ext/img_display.py
index d0a371f4..59887158 100644
--- a/ranger/ext/img_display.py
+++ b/ranger/ext/img_display.py
@@ -131,7 +131,8 @@ class W3MImageDisplayer(ImageDisplayer):
                 filename = path)
 
     def quit(self):
-        if self.is_initialized:
+        if self.is_initialized and self.process \
+                and self.process.poll() is not None:
             self.process.kill()
 
 class ITerm2ImageDisplayer(ImageDisplayer, FileManagerAware):