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-07-20 12:05:30 +0200
commit3f64bb68ffb16367d7fbda670e18a03f25b784cc (patch)
tree744066a7c02bc64e37a14fe083eefd4034d9b353
parente6570ecfc878d27b1fce0eefe84919db4d4841e1 (diff)
downloadranger-3f64bb68ffb16367d7fbda670e18a03f25b784cc.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):