about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@hut.pm>2019-03-31 22:14:30 +0200
committerhut <hut@hut.pm>2019-03-31 22:14:30 +0200
commitbf00980230e016283ce0c19702889ab727b7523f (patch)
tree2e3233b24bab7fe0383dabdcb507f33510aaded2
parentf16996814240b209a6462747224bfbdb114cd4fc (diff)
downloadranger-bf00980230e016283ce0c19702889ab727b7523f.tar.gz
core.actions: avoid error message when pressing right in empty dir
-rw-r--r--ranger/core/actions.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 75697696..92d36afc 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -521,6 +521,8 @@ class Actions(  # pylint: disable=too-many-instance-attributes,too-many-public-m
                 selection = self.thistab.get_selection()
             else:
                 selection = [tfile]
+            if tfile is None:
+                return
             if tfile.is_directory:
                 self.thistab.enter_dir(tfile)
             elif selection: