mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
details: Don't traceback if VM deleted with open details window
When a VM is undefined, whether explicitly through virt-manager or behind our back, we close and cleanup any associated vmmDetails windows. However there's a race here: if the details window is the last remaining top level window, cleanup() is called twice which tracebacks. Fix this by dispatching the exit_app routine in an idle callback, to avoid racing with any window delete routines. Reported-by: Leonardo Garcia <lagarcia@br.ibm.com>
This commit is contained in:
parent
665375db1b
commit
ff297777cc
@ -331,7 +331,9 @@ class vmmEngine(vmmGObject):
|
||||
if (self.windows <= 0 and
|
||||
self.systray and
|
||||
not self.systray.is_visible()):
|
||||
self.exit_app(src)
|
||||
# Defer this to an idle callback, since we can race with
|
||||
# a vmmDetails window being deleted.
|
||||
self.idle_add(self.exit_app, src)
|
||||
|
||||
def _cleanup(self):
|
||||
uihelpers.cleanup()
|
||||
|
Loading…
Reference in New Issue
Block a user