summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2012-12-17 15:18:25 +0100
committerhut <hut@lavabit.com>2012-12-17 15:18:25 +0100
commit697082ecf15f2ce8e380e9aca054449a8cf23b0a (patch)
treef972451cb477ff6382dc1640f1e32bb5ec909e3e
parentb434ff26739aec5ec7520cad7a552fadb1ddf0d3 (diff)
downloadranger-697082ecf15f2ce8e380e9aca054449a8cf23b0a.tar.gz
widgets.statusbar: avoid an exception on bad current path
-rw-r--r--ranger/gui/widgets/statusbar.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ranger/gui/widgets/statusbar.py b/ranger/gui/widgets/statusbar.py
index 3c9d0ed8..d87ff291 100644
--- a/ranger/gui/widgets/statusbar.py
+++ b/ranger/gui/widgets/statusbar.py
@@ -140,7 +140,11 @@ class StatusBar(Widget):
 				and self.column.target.is_directory:
 			target = self.column.target.pointed_obj
 		else:
-			target = self.fm.thistab.at_level(0).pointed_obj
+			directory = self.fm.thistab.at_level(0)
+			if directory:
+				target = directory.pointed_obj
+			else:
+				return
 		try:
 			stat = target.stat
 		except: