diff options
Diffstat (limited to 'usb-redir.c')
-rw-r--r-- | usb-redir.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usb-redir.c b/usb-redir.c index 24fdd31ce5..fb91c926a9 100644 --- a/usb-redir.c +++ b/usb-redir.c @@ -225,6 +225,10 @@ static int usbredir_write(void *priv, uint8_t *data, int count) { USBRedirDevice *dev = priv; + if (!dev->cs->opened) { + return 0; + } + return qemu_chr_fe_write(dev->cs, data, count); } |