about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2020-08-12 23:20:17 +0200
committertoonn <toonn@toonn.io>2020-08-12 23:20:47 +0200
commit7a0d077e4545f18d30488122fee80ba4df1c7b52 (patch)
tree7bcea05e76777b1e1973e673cc76a231c4180e72 /ranger
parent240d8a0ea1b82690372ba067c24a3f581a29c782 (diff)
downloadranger-7a0d077e4545f18d30488122fee80ba4df1c7b52.tar.gz
If files is None we can't set the _pointed_obj
Fixes #2071
Diffstat (limited to 'ranger')
-rw-r--r--ranger/core/tab.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ranger/core/tab.py b/ranger/core/tab.py
index 64edf120..1771ffa2 100644
--- a/ranger/core/tab.py
+++ b/ranger/core/tab.py
@@ -69,7 +69,10 @@ class Tab(FileManagerAware, SettingsAware):  # pylint: disable=too-many-instance
 
     def _set_pointer(self, value):
         self._pointer = value
-        self._pointed_obj = self.thisdir.files[self._pointer]
+        try:
+            self._pointed_obj = self.thisdir.files[self._pointer]
+        except TypeError:
+            pass
 
     pointer = property(_get_pointer, _set_pointer)