Fix a segfault when the connection is dropped

The error dialog window was created on the "tick" thread, causing a
crash in GTK.  Fix it by moving its invocation to the main thread.
This commit is contained in:
Giuseppe Scrivano 2013-03-11 09:21:48 +01:00 committed by Cole Robinson
parent a6881c6ff1
commit 823c3b20b5
2 changed files with 3 additions and 3 deletions

View File

@ -291,8 +291,9 @@ class vmmEngine(vmmGObject):
logging.debug("Closing connection since libvirtd "
"appears to have stopped")
else:
self.err.show_err(_("Error polling connection '%s': %s") %
(conn.get_uri(), e))
error_msg = _("Error polling connection '%s': %s") \
% (conn.get_uri(), e)
self.idle_add(lambda: self.err.show_err(error_msg))
self.idle_add(conn.close)

View File

@ -26,7 +26,6 @@ website: wiki-ify the whole thing, drop static content, move site styling into v
Misc issues
===========
If libvirt connection is dropped, app segfaults
segfault if open test:///default, then try and open testdriver that libvirt can't parse XML