summary refs log tree commit diff stats
path: root/ranger/applications.py
diff options
context:
space:
mode:
Diffstat (limited to 'ranger/applications.py')
-rw-r--r--ranger/applications.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/ranger/applications.py b/ranger/applications.py
index ca934920..7f029fde 100644
--- a/ranger/applications.py
+++ b/ranger/applications.py
@@ -44,12 +44,14 @@ def run(*args, **kw):
 		kw['flags'] = ''.join(f for f in kw['flags'] if f in 'd')
 		process2 = kw['apps'].app_pager(**kw)
 		return process2
+
 	if 'd' in flags:
 		process = Popen(args, **popen_kw)
 		return process
+
 	else:
-		fm.ui.exit()
+		if fm.ui is not None: fm.ui.exit()
 		p = Popen(args, **popen_kw)
 		waitpid_no_intr(p.pid)
-		fm.ui.initialize()
+		if fm.ui is not None: fm.ui.initialize()
 		return p