On linux, don't use Qt to render covers, etc. if the DISPLAY environment variable is unset

This commit is contained in:
Kovid Goyal 2009-08-06 16:26:23 -06:00
parent c6f13474c6
commit 41df24137a

View File

@ -487,6 +487,8 @@ class Application(QApplication):
def is_ok_to_use_qt():
global gui_thread
if islinux and os.environ.get('DISPLAY', None) is None:
return False
if QApplication.instance() is None:
QApplication([])
if gui_thread is None: