Fix IPC when there's no main window available.

This commit is contained in:
Florian Bruhin 2014-10-14 07:58:16 +02:00
parent 0e9177eb4f
commit 7c0a23b1b7

View File

@ -239,7 +239,9 @@ class Application(QApplication):
try:
window = objreg.get('last-main-window')
except KeyError:
message.error("No main window found!")
# We can't display an error here because... duh, there is no
# window.
log.ipc.error("No main window found!")
return None
else:
if open_target != 'tab-silent':