]> git.proxmox.com Git - qemu.git/blobdiff - qemu-char.c
Merge remote-tracking branch 'riku/linux-user-for-upstream' into staging
[qemu.git] / qemu-char.c
index 74c60e11a03d5e124ae79fa05ab2ac69bc190936..a9fc50481aeb6665dac2f4b1459662254b9bb1c1 100644 (file)
@@ -160,7 +160,9 @@ int qemu_chr_be_can_write(CharDriverState *s)
 
 void qemu_chr_be_write(CharDriverState *s, uint8_t *buf, int len)
 {
-    s->chr_read(s->handler_opaque, buf, len);
+    if (s->chr_read) {
+        s->chr_read(s->handler_opaque, buf, len);
+    }
 }
 
 int qemu_chr_fe_get_msgfd(CharDriverState *s)