diff options
author | toonn <toonn@toonn.io> | 2020-08-12 23:20:17 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2020-08-12 23:20:47 +0200 |
commit | 7a0d077e4545f18d30488122fee80ba4df1c7b52 (patch) | |
tree | 7bcea05e76777b1e1973e673cc76a231c4180e72 | |
parent | 240d8a0ea1b82690372ba067c24a3f581a29c782 (diff) | |
download | ranger-7a0d077e4545f18d30488122fee80ba4df1c7b52.tar.gz |
If files is None we can't set the _pointed_obj
Fixes #2071
-rw-r--r-- | ranger/core/tab.py | 5 |
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) |