Fix shutdown before prompter is alive.

This commit is contained in:
Florian Bruhin 2014-09-25 22:56:22 +02:00
parent 9e307a5918
commit f8f0c69d79

View File

@ -729,7 +729,8 @@ class Application(QApplication):
return
self._shutting_down = True
log.destroy.debug("Shutting down with status {}...".format(status))
if objreg.get('prompter').shutdown():
prompter = objreg.get('prompter', None)
if prompter is not None and prompter.shutdown():
# If shutdown was called while we were asking a question, we're in
# a still sub-eventloop (which gets quitted now) and not in the
# main one.