Fix shutdown before prompter is alive.
This commit is contained in:
parent
9e307a5918
commit
f8f0c69d79
@ -729,7 +729,8 @@ class Application(QApplication):
|
|||||||
return
|
return
|
||||||
self._shutting_down = True
|
self._shutting_down = True
|
||||||
log.destroy.debug("Shutting down with status {}...".format(status))
|
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
|
# 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
|
# a still sub-eventloop (which gets quitted now) and not in the
|
||||||
# main one.
|
# main one.
|
||||||
|
Loading…
Reference in New Issue
Block a user