about summary refs log tree commit diff stats
path: root/ranger/gui/displayable.py
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2016-04-04 00:01:34 +0200
committerhut <hut@lepus.uberspace.de>2016-04-04 00:02:07 +0200
commitb90640b0a99a98eb0db71417b0447eb077412785 (patch)
treee148b616b9c0cae41e6ffe238c20f79b0f615cfb /ranger/gui/displayable.py
parent62c45b6f36cdad7b49f019f8bf982c818f372871 (diff)
downloadranger-b90640b0a99a98eb0db71417b0447eb077412785.tar.gz
implement switching viewmodes with ~ key
Diffstat (limited to 'ranger/gui/displayable.py')
-rw-r--r--ranger/gui/displayable.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ranger/gui/displayable.py b/ranger/gui/displayable.py
index 8415b82c..c6e21d54 100644
--- a/ranger/gui/displayable.py
+++ b/ranger/gui/displayable.py
@@ -95,7 +95,8 @@ class Displayable(FileManagerAware, CursesShortcuts):
 
     def destroy(self):
         """Called when the object is destroyed."""
-        del self.win
+        if hasattr(self, 'win'):
+            del self.win
 
     def contains_point(self, y, x):
         """Test whether the point lies inside this object.