umlAutostartDomain: avoid NULL-deref upon virGetLastError failure

* src/uml/uml_driver.c (umlAutostartDomain): Handle a NULL return
from virGetLastError.
This commit is contained in:
Jim Meyering 2010-05-17 14:38:14 +02:00
parent 6e5b5bbc0a
commit 8e8bda2614

View File

@ -157,7 +157,7 @@ umlAutostartDomain(void *payload, const char *name ATTRIBUTE_UNUSED, void *opaqu
if (umlStartVMDaemon(data->conn, data->driver, vm) < 0) {
virErrorPtr err = virGetLastError();
VIR_ERROR(_("Failed to autostart VM '%s': %s"),
vm->def->name, err->message);
vm->def->name, err ? err->message : "");
}
}
virDomainObjUnlock(vm);