Message ID | 1321240741-23055-4-git-send-email-david@gibson.dropbear.id.au |
---|---|
State | New |
Headers | show |
diff --git a/hw/spapr_vty.c b/hw/spapr_vty.c index a9d4b03..f4f3ee3 100644 --- a/hw/spapr_vty.c +++ b/hw/spapr_vty.c @@ -58,6 +58,11 @@ static int spapr_vty_init(VIOsPAPRDevice *sdev) { VIOsPAPRVTYDevice *dev = (VIOsPAPRVTYDevice *)sdev; + if (!dev->chardev) { + fprintf(stderr, "spapr-vty: Can't create vty without a chardev!\n"); + exit(1); + } + qemu_chr_add_handlers(dev->chardev, vty_can_receive, vty_receive, NULL, dev);