mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-28 10:48:11 +01:00
On linux, don't use Qt to render covers, etc. if the DISPLAY environment variable is unset
This commit is contained in:
parent
c6f13474c6
commit
41df24137a
1 changed files with 2 additions and 0 deletions
|
|
@ -487,6 +487,8 @@ def __init__(self, args):
|
|||
|
||||
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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue